Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

GUIKit001 - Plug and Play Interface for iPhone, iPad, PC/MAC

Discussion in 'iOS and tvOS' started by col000r, Sep 13, 2010.

  1. RolfBertram_dot_me

    RolfBertram_dot_me

    Joined:
    Mar 1, 2011
    Posts:
    128
    Updated:
    Crash on start or on loading a game level.
    device: iPad1 (iPad2 is o.k.)
    test setup: plenty of apps in background to simulate real-world conditions
    Xcode instruments readout:
    Menu: 8MB active, 150MB total. That seem a lot!!! Game level 240MB total.
    Test with Menu taken out of the built: Game level 80MB total, which is about the difference between 150MB menu and the game level started from menu, which reads 240MB.
    Test with everything in Level 0 (GUI level) deactivated: 5MB active, 14MB total
    Test with GUI prefab active, but all attached scripts (Standard GUI, Debug, 2 x Swipe Control) deactivated: 6 MB active, 144MB total!!!
    Test with blank project, just GUI demo menu: 6 MB Active, 75MB total. Starts with memory warning.

    It appears that the total memory usage is what really counts, since it makes sense that 150MB on a 256MB RAM iPAD1 might cause a crash if plenty of apps are in the background, and those might use already 50% of RAM. That would also explain no crashes on iPAD2, which has 512MB RAM.

    Question: Is there something wrong if the Menu takes 150MB?

    freundliche Gruesse
    Rolf
     
    Last edited: May 1, 2011
  2. Deleted User

    Deleted User

    Guest

    The GUIKit textures are located under Resources, so they're all included in the build, although I believe only the 100percent or 200percent assets are loaded depending on your device and resolution. If I'm building just for one screen size, I remove the unused version if only to reduce the file size. I've also gone into the StandardGUI script and removed all Resource.Load calls for anything that I'm not using (e.g. the credit and level screens). And I remove any skin textures that I'm not using, e.g. if I'm not using radio buttons, I remove those textures.
     
  3. RolfBertram_dot_me

    RolfBertram_dot_me

    Joined:
    Mar 1, 2011
    Posts:
    128
    Thanks for the tip. I'm looking into deleting unneeded files in the GUI folder now. Currently the GUI allocates 150MB according XCode Instruments.
    Rolf
     
    Last edited: May 2, 2011
  4. Deleted User

    Deleted User

    Guest

    I also removed the loop wav file in Resources/Audio since I'm not using that, either.
     
  5. RolfBertram_dot_me

    RolfBertram_dot_me

    Joined:
    Mar 1, 2011
    Posts:
    128
    Thanks for the tip. Have you checked with Xcode Instruments how much memory the GUI allocates? Maybe I do something wrong that makes is use 150MB!
    Rolf
     
  6. Deleted User

    Deleted User

    Guest

    I haven't checked the memory, but 150MB does sound like an awful lot. I haven't heard of any crashes with my apps using GUIKit, but I haven't added any content to it, and I only use the start and pause menus (and none of the level-loading code), so I removed everything that's not necessary. It even runs on my 2nd-gen iPod touch!
     
  7. RolfBertram_dot_me

    RolfBertram_dot_me

    Joined:
    Mar 1, 2011
    Posts:
    128
    Thanks for the info. Which of your games use GUIKit001?
    Rolf
     
  8. Deleted User

    Deleted User

    Guest

    Fugu Bowl, Fugu Maze and HyperBowl (links are on http://fugugames.com/ ) HyperBowl is the biggest one. I'm getting it to run on my Android phone right now and GUIKit001 looks fine on it. I added some UNITY_ANDROID's to the StandardGUI script, but that might have been for my code additions.
     
  9. nah0y

    nah0y

    Joined:
    Apr 4, 2011
    Posts:
    74
    Hi sonicviz,

    Sorry for the late reply, I didn't see the message,

    Well, one of the advantages I see is that you can build screens on separate scripts and be more organized, but you know, you can live with everything in one file :)
     
  10. RichardP

    RichardP

    Joined:
    Jul 8, 2011
    Posts:
    6
    Hi,

    I purchased GUIKit001 from gameassets.net last year and have been trying to contact Blackish support for months now (as my email address has changed and I no longer receive updates). I've sent several emails to Blackish support and received no reply. I have my username and password for accessing update 3.

    Would anyone be kind enough to provide the download URL for update 4? (I assume my username and password will work the same?)

    Kind Regards,
    -Richard
     
    Last edited: Jul 13, 2011
  11. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    I sent several emails over the last month on some issues and never got a reply, so not sure what's up.
    Previous to that I always got a response. I solved the issues anyway, so now I know GUIkit a lot better;-)
     
    Last edited: Jul 13, 2011
  12. RichardP

    RichardP

    Joined:
    Jul 8, 2011
    Posts:
    6
    sonicviz - this is a bit of a worry - do you have the download url for the latest update?
     
  13. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    Sorry, my one from the store has expired anyway.
     
  14. RichardP

    RichardP

    Joined:
    Jul 8, 2011
    Posts:
    6
    I received an email from Markus, he's recovering from serious surgery and has been on sick-leave for 3+ months. He estimates he'll be back at work in 1 or 2 weeks. Markus did write that he's expecting to push out another update when he's back at work. Thankfully, I've received the update!
     
    Last edited: Jul 13, 2011
  15. col000r

    col000r

    Joined:
    Mar 27, 2008
    Posts:
    698
    I'm back. Sorry for the silence!

    First up: A small update will be out soon, fixing/adding a few things.

    @nah0y: Update will include a new version of SwipeControl that will make it easy to do vertical scrolling. If you don't use the currentValue of SwipeControl as the selection, but instead add some code that handles which item is actually selected, you'd have something similar.

    regarding memory-usage: The demo scene uses only uncompressed images for all of the GUI elements. That can of course be too much for a device with little RAM (especially the 4th gen iPod touch - Retina display but only 256MB of RAM) - so if you run into crashes, you need to compress the GUI stuff (but be careful with the images used by the GUISkin, because compressing them would mean changing their dimensions, which in turn would break the setup of the Skin...).
    In addition, in the next update the code responsible for destroying the old level is moved up above the code for loading the new level!
     
  16. col000r

    col000r

    Joined:
    Mar 27, 2008
    Posts:
    698
    GUIKit001 v1.4.2 was out yesterday and fixed/changed a few minor things

    GUIKit001 v1.4.3 is available today and makes everything ready for Unity 3.4 (I updated all the Javascript code to work with the stricter strict compilation mode!)
     
  17. AtomicChimp

    AtomicChimp

    Joined:
    Aug 9, 2011
    Posts:
    47
    I purchased SwipeControl because of its ease of use and nice functionality. However, being a newbie, I cannot decipher how I add the action that occurs when the menu item is tapped. I would like to load a different scene when it is tapped. I did not think that I was supposed to have to get into your code to implement this plugin but it seems that there is no option for adding the action. Could you help direct me to where I would add this in your code?
     
  18. minevr

    minevr

    Joined:
    Mar 4, 2008
    Posts:
    1,018
    if(currentValue - (smoothValue + (smoothValue - GetAvgValue(prevSmoothValue))) > smoothDragOffset ){ //dragged beyond dragOffset to the right
    currentValue = currentValue -1;
    xVelocity = (smoothValue - GetAvgValue(prevSmoothValue)); // * -0.10 ;
    if(currentValue > maxValue) currentValue = maxValue;
    else if(currentValue < 0) currentValue = 0;
    }else if(currentValue - (smoothValue + (smoothValue - GetAvgValue(prevSmoothValue))) < -smoothDragOffset){ //dragged beyond dragOffset to the right
    currentValue = currentValue +1;
    xVelocity = (smoothValue - GetAvgValue(prevSmoothValue)); // * -0.10 ;
    if(currentValue > maxValue) currentValue = maxValue;
    else if(currentValue < 0) currentValue = 0;
    }
     
  19. minevr

    minevr

    Joined:
    Mar 4, 2008
    Posts:
    1,018
    Now is SwipeControl_v1.2?
     
  20. RecursiveFrog

    RecursiveFrog

    Joined:
    Mar 7, 2011
    Posts:
    350
    Has anyone published an application that uses GUIKit001 to any of the app stores? I'd very much like to see how this performs in the real world.

    Also, when I play with the demo on this page : http://gameassets.net/demo/guiSkin001.html I am very confused about how the click / touch reactions and updates feel *incredibly* slow and sluggish for the slider bars and scrollbars (Mac OS Lion, Chrome) while the redraws for sizing, scale, and sliding are smooth as butter.

    Has anyone else found that this library has problems with responsiveness?

    EDIT : After clicking away from the screen and back onto it after about 3 minutes, all problems with responsiveness vanished. This is most concerning.
     
    Last edited: Nov 16, 2011
  21. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    Sure -> http://games.sonicviz.com/chordskilz/
     
  22. col000r

    col000r

    Joined:
    Mar 27, 2008
    Posts:
    698
    Nice app, @sonicviz!

    XenoCore and HyperBowl are 2 more on the AppStore that incorporate it, any others out there?

    My next game (that I've been working on forever and that incorporates every piece from GameAssets.net) will finally be out in a few short weeks now...
     
  23. playmaker86

    playmaker86

    Joined:
    Oct 26, 2011
    Posts:
    2
    Hi,

    I would like to make my game interface menu like your demo interface.

    how to make it?

    please... I wanna know that..
     
  24. col000r

    col000r

    Joined:
    Mar 27, 2008
    Posts:
    698
  25. col000r

    col000r

    Joined:
    Mar 27, 2008
    Posts:
    698
    @playmaker86: I don't think I understand. The demo interface is included in GUIKit001, do you want to make something like it without GUIKit?
     
  26. playmaker86

    playmaker86

    Joined:
    Oct 26, 2011
    Posts:
    2
    That's right! Would please how to work sliding menu like Your interface Demo???
     
  27. col000r

    col000r

    Joined:
    Mar 27, 2008
    Posts:
    698
    @playmaker86: it's a bit complex... but in short: look into the use of GUI.matrix and then animate the position for each part of the interface.
     
  28. Neefy

    Neefy

    Joined:
    Nov 28, 2012
    Posts:
    24
    How do I add a QUIT button to the mainmenu (StandardGUI)? It Would be really helpful if you could post the QUIT button script because I am new to scripting.
     
    Last edited: Jan 21, 2013
  29. col000r

    col000r

    Joined:
    Mar 27, 2008
    Posts:
    698
    @Neefy: The easiest way would be to replace the "Credits" Button with Quit. In the inspector change InfoButtonName to Quit, open the script, search for "if(GUI.Button(mainMenuB3Rect, infoButtonName)) {" and replace the contents of that if with Application.Quit();

    If you want a popup-window before quitting, have a look at how the news-box does it 5 lines below!
     
  30. Neefy

    Neefy

    Joined:
    Nov 28, 2012
    Posts:
    24
    Thank you very much for replying. I think you have misunderstood. I want to add a "Quit" Button below "Credits", so what would the easiest way be?
     
    Last edited: Jan 21, 2013
  31. col000r

    col000r

    Joined:
    Mar 27, 2008
    Posts:
    698
    I've submitted an update that adds a quit button to the top right corner on PC/Mac/Linux. Should be out sometime soon!
     
  32. Neefy

    Neefy

    Joined:
    Nov 28, 2012
    Posts:
    24
    Thank you. I finally figured it out :)
     
  33. Sir-Gatlin

    Sir-Gatlin

    Joined:
    Jan 18, 2013
    Posts:
    28
    Hey col00r, Love the plug-in, really have enjoyed using it, but I'm wondering how would I go about making another tier of menu's? Example front page you would click on missions, brings up a list of "areas" on a turn table, then when you select one it will take you to another turntable with different choices of the specific missions. I'm quite new to coding and have learned a lot of java scripting using Guikit but this one has me stumped.

    Thanks,
    G