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

Prime31 UIToolkit Multi Resolution GUI Solution Ready for Use...and it's free

Discussion in 'iOS and tvOS' started by prime31, May 3, 2011.

  1. Jon-at-Kaio

    Jon-at-Kaio

    Joined:
    Oct 17, 2007
    Posts:
    185
    Hi There Prime31
    Excellent plugin, very useful, but got a minor problemo.
    I wanted to use this for both an iPhone project a Browser project but I'm getting failures all over
    everything is fine in the unity editor coz the compiler directives are gated for UNITY_EDITOR however that obviously prevents that code from going into the WebBrowser compilation.
    As I've tried failed to modify the directives to also select UNITY_WEBPLAYER and its failing all over the shop, I'm guessing that it's not that simple?

    Any tips/insight?
     
  2. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @jon, UIToolkit works fine in a web player. I'm not sure if you have a modified version or not but all the compiler directives are pretty clear:

    Code (csharp):
    1. #if UNITY_EDITOR || UNITY_STANDALONE_OSX || UNITY_STANDALONE_WIN || UNITY_WEBPLAYER
     
  3. Jon-at-Kaio

    Jon-at-Kaio

    Joined:
    Oct 17, 2007
    Posts:
    185
    Possible I have an older version then as the directives were only for #if UNITY_EDITOR
     
  4. Jon-at-Kaio

    Jon-at-Kaio

    Joined:
    Oct 17, 2007
    Posts:
    185
    Yep a pretty early version just redownloaded and theres Lots more goodies to play with :)
    Thanks for some great work
     
  5. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Patyrn, it looks like you are using the same Material for both instances of your UIToolkits. Each one needs to have a unique material so that it can house it's own texture.
     
  6. Patyrn

    Patyrn

    Joined:
    Feb 17, 2011
    Posts:
    57
    @Prime31, damn I really should have noticed that. Works now. Thanks!
     
  7. Patyrn

    Patyrn

    Joined:
    Feb 17, 2011
    Posts:
    57
    Did you use BMFont or one of the others? I can't seem to actually create transparent fonts in BMFont.
     
  8. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    I use Hiero and it seems to work well except for purporting everything flipped.
     
  9. Patyrn

    Patyrn

    Joined:
    Feb 17, 2011
    Posts:
    57
    Sucks cause I'm on windows and seem to be stuck with BMFont. Anyone else on windows in here want to chime in on their BMFont experiences?
     
  10. actuallystarky

    actuallystarky

    Joined:
    Jul 12, 2010
    Posts:
    188
    @Patryn I've found that BMFont doesn't work properly with padding for some reason. If you set the padding high, your letters end up over each other, if you set it low, you end up with parts of your font being clipped off. Weird, as I've used BMFont at work on a professional project with no problems.

    So now I'm stuck with Hiero - which does work on windows by the way - but perhaps using the term "works" is being overly generous. On my machine it doesn't update the exported bitmap until you restart it and it crashes everytime you shut it down. Also, when you finally get something usable out of it you have to manually flip the exported bitmap in your image editor of choice. It took me an entire weekend to finally get some text in my game, though now I've mapped out the myriad bugs and gotcha's the pipeline is more or less usable.

    I was very surprised not to read of anyone else's issues in this matter. Are they software gremlins specific to my setup? I'm running windows 7.

    Oh, and a big thanks to Prime 31 for releasing a powerful, usable and free UI solution for Unity.
     
  11. cr0ybot

    cr0ybot

    Joined:
    Apr 29, 2011
    Posts:
    7
    Any reason why it might be doing this?



    Code (csharp):
    1.  
    2. using UnityEngine;
    3. using System.Collections;
    4.  
    5. public class UIToolkitManager : MonoBehaviour {
    6.    
    7.     private string textString;
    8.     private UITextInstance screenText;
    9.    
    10.     void Start() {
    11.         UIText uiText = new UIText("prototype", "prototype.png");
    12.        
    13.         var textSize = uiText.sizeForText("Hello world!", 0.05f);
    14.        
    15.         var x = UIRelative.xPercentFrom( UIxAnchor.Left, 0f, textSize.x);
    16.         var y = UIRelative.yPercentFrom( UIyAnchor.Top, 0f, textSize.y);
    17.        
    18.         screenText = uiText.addTextInstance("Hello world!", x, y, 0.05f, 0, Color.black);
    19.     }
    20. }
    21.  
    I'm just using the font files supplied with the demo, since I couldn't get my own font to display properly... but the "prototype" font still shows up weirdly spaced. I'm also having trouble understanding how the relative positioning works, because it doesn't look like it's doing anything here.

    The strangest part is that the demo "TextTest" scene works fine... and I can't figure out what I'm doing that is any different!
     
  12. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @cr0ybot, I am wondering if the scale is so small that floating point to int conversion is throwing the whole thing off. Try bumping your scale up to a higher number and see if that does the trick.
     
  13. Patyrn

    Patyrn

    Joined:
    Feb 17, 2011
    Posts:
    57
    Is there anything special I have to do when adding buttons to a UIVerticalLayout? My layout initially displays fine, and then I add more buttons to it in response to players clicking other buttons, and it immediately goes to 0,0 on the screen. Here's the code:

    shipLayout.addChild(shipButton);
    shipLayout.pixelsFromTopLeft(50, 50);


    I tried setting pixelsFromTopLeft before and after, either results in the same thing.
     
    Last edited: Jun 2, 2011
  14. Matkins

    Matkins

    Joined:
    Aug 24, 2009
    Posts:
    152
    I'm having an issue with z depth. I wasn't setting the z layer for my sprites because they just happened to be correct. But recently I added a new button and this upset the happy balance, so now one sprite started displaying behind another, which i do not want. Now i'm trying to correct it by using the z depth parameter when creating the sprite. I've tried it both ways round, 0-1 and 1-0, but it makes no difference, setting the z depth doesn't seem to do anything at all. Does it work for others?
     
  15. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @marlins, try using larger, integer zIndexes like 1, 2, 3, etc.
     
  16. Lacrymology

    Lacrymology

    Joined:
    Apr 7, 2011
    Posts:
    8
    This is great work. It looks a lot like what I'm trying to achieve, but better achieved.

    How well does this scale to different resolutions / other devices? what does it do?
    is there a way to tell the components whether to scale or move about? For what I've seen, they'll just move about until the switchTo2X trigger is hit.
     
  17. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Lacrymology, no scaling occurs at all. The idea is to have everything displayed pixel perfect. If you wanted to scale your UI elements you could certainly apply scale to them but the toolkit wont do that for you. The main idea behind it is to layout your UI for standard res, retina res and tablet res with a single set of code. Of course, when on a tablet just having larger buttons may not be enough and you may want to add additional features/UI elements but it is all pretty simple.
     
  18. Superflat

    Superflat

    Joined:
    Mar 19, 2009
    Posts:
    354
    Hello,

    I'm doing a simpel addSprite but the texture is ENORMOUS. Any idea what's causing this? Clean project with the standard setup.

    Code (csharp):
    1. var sprite = UI.firstToolkit.addSprite("Hbarbar.png", 0, 0);
    all the settings on the textures are set appropriately and the size is 512x512.
     
    Last edited: Jun 2, 2011
  19. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Raziel, whatever size is exported by TexturePacker for your image (which will be the actual pixel size unless you scaled it) is exactly the size it will appear on screen. Did you perhaps forget to modify the culling mask of your main camera to ignore the UILayer?
     
  20. Superflat

    Superflat

    Joined:
    Mar 19, 2009
    Posts:
    354
    Culling masks are set appropriately. The following describes the image

    Code (csharp):
    1. "Hbarbar.png":
    2. {
    3.     "frame": {"x":1,"y":1,"w":210,"h":28},
    4.     "rotated": false,
    5.     "trimmed": true,
    6.     "spriteSourceSize": {"x":179,"y":51,"w":210,"h":28},
    7.     "sourceSize": {"w":512,"h":128}
    8. },
    I double checked the culling mask and layers. It's all correct. The sprite shows up in the editor view but not in the game view.
     
    Last edited: Jun 2, 2011
  21. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Raziel, make sure you exported atlas is a square.
     
  22. Superflat

    Superflat

    Joined:
    Mar 19, 2009
    Posts:
    354
    I've attached the atlas, as you can see it's 512x512 :)

    [EDIT] After deleting everything and rebuilding the project it appears to be working correctly. I was using the Demo project as a testbed, perhaps something was causing incorrect behavior! Sorted now :)
     

    Attached Files:

    Last edited: Jun 2, 2011
  23. Matkins

    Matkins

    Joined:
    Aug 24, 2009
    Posts:
    152
    Ok, i've tried using bigger numbers. Same situation, I can't control the depth of sprites.
     
  24. Matkins

    Matkins

    Joined:
    Aug 24, 2009
    Posts:
    152
    Aha, maybe it's because the sprites i'm trying to layer have different managers. I need a way to layer managers.

    EDIT: Fixed. Well that was easy. I'll be requesting a pull on github shortly.
     
    Last edited: Jun 3, 2011
  25. actuallystarky

    actuallystarky

    Joined:
    Jul 12, 2010
    Posts:
    188
    Is there a way to have UI elements persist between levels, like on a loading screen. It doesn't seem possible to me, with UI managers being tied to levels. I thought of adding dontdestroyonload to the UI and UIToolKit gameobjects but then it's easy to get duplicates in your levels as they get loaded in and out.

    Has anyone tried anything like this? It's no big deal, but it would be nice to fit my loading screen on my sprite texture page. And animating loading text could be nice.
     
  26. Matkins

    Matkins

    Joined:
    Aug 24, 2009
    Posts:
    152
    @actuallystarky

    I've got what i call a global gui object that persists between all scene changes. The way i avoid duplicates is i have a "start" scene which only ever gets loaded once when the game starts, everything in there is set to DontDestroyOnLoad, the next scene is loaded immediately.

    Code (csharp):
    1.  
    2. void Start()
    3. {
    4.     GameObject[] allObjects = UnityEngine.Object.FindObjectsOfType(typeof(GameObject)) as GameObject[];
    5.     foreach( GameObject go in allObjects )
    6.     {
    7.         DontDestroyOnLoad( go );
    8.     }
    9.    
    10.     Application.LoadLevel("NameOfFirstRealSceneHere");
    11. }
    12.  
     
  27. Patyrn

    Patyrn

    Joined:
    Feb 17, 2011
    Posts:
    57
    In regards to my last question, I still have not figured it out. I do notice that if I log the position of the UIVerticalLayout after I add a button, it reports (47500.0, -30200.0, 0.0).

    Could this be a bug?
     
  28. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Patyrn, I am guessing it is from calling pixelsFromTopLeft on the button that is in the layout. The layouts all have built in padding and margins and arent taken into account when using the positioning methods. They were made to drop a bunch of similar items in and have them line up with the specified margins and padding.
     
  29. Patyrn

    Patyrn

    Joined:
    Feb 17, 2011
    Posts:
    57
    I set pixelsFromTopLeft on the layout, not the button. The button is instantiated at 0 0 and left there for the layout to control.
     
  30. actuallystarky

    actuallystarky

    Joined:
    Jul 12, 2010
    Posts:
    188
    @Matkins

    Yeah, I thought of something like that, but it tends to make development a pain. It means your GUI is broken when loading a level by itself - or you litter your levels with duplicates. I've solved this problem neatly with all my game managers with the following singleton pattern (which I found on the unity wiki)

    Code (csharp):
    1. private static RFR_GameManager instance = null;
    2.     public static RFR_GameManager Instance
    3.     {
    4.         get
    5.         {
    6.             if (instance == null)
    7.             {
    8.                 GameObject go = new GameObject();
    9.                 instance = go.AddComponent<RFR_GameManager>();
    10.                 go.name = "Game Manager";
    11.             }
    12.             return instance;
    13.         }
    14.     }
    So whenever you access the gamemanager using GameManager.Instance, it passes you the instance if it exists, or creates a new one if it doesn't. Works whether you're playing the game from the start or loading a single level out of order.

    I'll try putting together something similar for the UIToolkit. It all depends on whether I can create the gameobjects, the hierarchy and set all the layers in code. If so, I can wrap it all up in some kind of UIInitialise code which checks for the UI components and creates them if they don't exist.

    If I get something working I'll post it up here.
     
  31. actuallystarky

    actuallystarky

    Joined:
    Jul 12, 2010
    Posts:
    188
    okay, just spent a couple of hours playing with creating the UIToolkit gameobjects entirely in code. I seem to be able to get everything set up but the UIToolkit isn't happy - possibly because key elements of it's own initialisation rely on it existing in the scene before Awake is called on everything.

    Here's the code I've got so far. It seems to set everything up ok, except if I pause the scene I can see that the UI camera that UIToolkit creates doesn't have the correct layermask set and any attempt to create a UI element gets a null reference error.

    Code (csharp):
    1. public void Initialise()
    2.     {
    3.         //  Create the root UI gameobject
    4.         GameObject goUI = new GameObject();
    5.         goUI.name = "UI";
    6.  
    7.         UI ui = goUI.AddComponent<UI>();
    8.         ui.UILayer = 16384;
    9.         ui.isHD = false;
    10.         ui.drawDepth = 100;
    11.        
    12.         //  Creat the child UIToolkit, add component and set the settings
    13.         GameObject goUIToolkit = new GameObject();
    14.         goUIToolkit.name = "UIToolkit";
    15.         goUIToolkit.transform.parent = goUI.transform;
    16.         goUIToolkit.layer = LayerMask.NameToLayer("Prime31");
    17.        
    18.                 UIToolkit uitoolkit = goUIToolkit.AddComponent<UIToolkit>();
    19.         uitoolkit.texturePackerConfigName = "UISpritesheet";
    20.         uitoolkit.material = Resources.Load ("UIToolkitMaterial", typeof(Material)) as Material;
    21.        
    22.         //test
    23.         buttonPlay = UIButton.create("Button_Play.png", "Button_Play_pressed.png", 10,Screen.height / 2);
    24.  
    25.     }
    If this does turn out to be impossible, I don't suppose anyone knows of a way of having objects in your scene which only exist if that scene is being played first, rather than loaded into? Maybe destroying existing objects OnLevelLoad?
     
  32. Superflat

    Superflat

    Joined:
    Mar 19, 2009
    Posts:
    354
    Hi,

    1) I'm setting up a health bar using the progressbar, but i noticed that the animation in the kitchen sink example alternates between two different methods of animation. One appears to be a scale on the y-axis and the other a UV scroll. Is it possible to choose one or the other with the progressBar?

    2) when I set up a progressbar it appears it doesn't provide any layering. The bar that is animated falls behind the bigger bar border graphic. Is the border graphic meant to have a transparent center where the bar goes?

    3) Can i use UIToolkit for ingame sprites or do i need to resort to SpriteManager 2?
     
  33. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @starky, you can setup your singleton so that in the instance method you do a quick find of any other game objects with the component big you find one then destroy the current GO.

    @Raziel,
    1. Check the demo scene for the boolean that swaps the progress bar scale type. I don't have the source with me but it is right in the kitchen sink demo script.

    2. You have control over the layering of all sprouts with the zIndex property.

    3. I have never used SpriteManager 2 so this question is better answered by someone with experience with it.
     
  34. Superflat

    Superflat

    Joined:
    Mar 19, 2009
    Posts:
    354
    What i meant with layering was in regards to the two graphical components of the progressbar. My progress bar is falling behind the progress bar border. I supply the bar in the 1st argument and the background/border in the 2nd. Is the graphic in the 2nd component meant to be transparent in the location where the bar is supposed to go?
     
  35. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Raziel, if you set the actual bars zIndex to a lower number it will be rendered in front of the BG. The bar (if I recall correctly) is just an instance variable on the UIProgressBar instance.
     
  36. Superflat

    Superflat

    Joined:
    Mar 19, 2009
    Posts:
    354
    I checked out the sink examples and the scaling is clear to me now, thanks. However in the sink the bar border has a transparent area and it takes a string as an argument, not a sprite . I saw no way to set the index
     
    Last edited: Jun 6, 2011
  37. Patyrn

    Patyrn

    Joined:
    Feb 17, 2011
    Posts:
    57
    Upon further investigation the layout components break if you try to add any more children after your first call of pixelsFromXX

    Easily tested by changing this:

    // VerticalLayout
    var vBox = new UIVerticalLayout( 20, 0 );
    vBox.addChild( knob, toggleButton );
    vBox.pixelsFromBottomRight( 10, 10 );

    To this:

    // VerticalLayout
    var vBox = new UIVerticalLayout( 20, 0 );
    vBox.addChild( knob );
    vBox.pixelsFromBottomRight( 10, 10 );
    vBox.addChild( toggleButton );
    vBox.pixelsFromBottomRight( 10, 10 );
     
  38. Matkins

    Matkins

    Joined:
    Aug 24, 2009
    Posts:
    152
    So the game I've built is done, dusted and submitted, waiting for review (much thanks to Prime31). Now to port to Android...

    I've switched the Android platform in the build settings, selected "HTCLegend Tall (480x320)" in the Game window... Everything looks perfect, which is to be expected because it's the same resolution as an iPhone 3Gs.

    So next i tried running it with screen size set to "NexusOne Tall (480x800)" and it's all wrong, the sprites are cutting the wrong frames from the atlases, i see a sheet of many images covering an area where i'm only supposed to see one image.

    Are other people experiencing this? If so, what's the situation? Is UIToolkit only compatible with certain resolutions?
     
  39. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @matkins, are you setup to have both an SD and HD atlas? If so, I am guessing that it is flipping to HD on the higher resolution. Double check that your textures are set to be overridden on Android with no MIPS and truecolor for best results.
     
  40. Matkins

    Matkins

    Joined:
    Aug 24, 2009
    Posts:
    152
    Prime saves the day again. It was the "max size" field in particular that needed overriding to match the actual texture size.
     
  41. raptoplob

    raptoplob

    Joined:
    May 24, 2011
    Posts:
    12
    I was wondering if it's possible to change a button image via code? I have a set of buttons as a menu and would like the selected item to change to a different PNG.

    I did try togglebuttons but it seems you can't run code from them, is that correct?

    Thanks for your help, and for UIToolkit!
     
  42. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @raptoplob, you absolutely can change a button image and toggle buttons have an event fired when it changes. All you need to do is set the uvFrame of the button.

    Code (csharp):
    1. button.uvFrame = newImagesUVframe;
     
  43. raptoplob

    raptoplob

    Joined:
    May 24, 2011
    Posts:
    12
    Thanks Prime!

    BTW is there some reference material I could have found this out from? Would rather have you working on great Unity plugins than answering my silly questions!
     
  44. Superflat

    Superflat

    Joined:
    Mar 19, 2009
    Posts:
    354
    @Prime

    I'm trying to fix the issue with the progress bar but i find that the problem lies in the UIProgressbar itself.
    Code (csharp):
    1. public static UIProgressBar create( UIToolkit manager, string barFilename, string borderFilename, int barxPos, int baryPos, int borderxPos, int borderyPos )
    2.     {      
    3.         var bar = manager.addSprite( barFilename, borderxPos + barxPos, borderyPos + baryPos, 2 );
    4.         var borderTI = manager.textureInfoForFilename( borderFilename );
    5.         var borderFrame = new Rect( borderxPos, borderyPos, borderTI.frame.width, borderTI.frame.height );
    6.        
    7.         return new UIProgressBar( manager, borderFrame, 1, borderTI.uvRect, bar );
    8.     }
    If you're using a texture for the background of the bar that has NO transparent area, the bar will be put behind it and the only way to fix it is through fixing this bit of code. I tried messing with the depth on the 'bar' variable at first but that did nothing. So i rewrote some of it but then quickly got lost in the code of UItoolkit and couldnt figure out where the texture for the border was coming from.

    [Edit] Fixed it. in the return statement you supply a depth of 1 which puts the background over the bar. I could amend this with an extra parameter in the create function and make a pull request if you want. Let people choose the display style.
     
    Last edited: Jun 7, 2011
  45. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @raptoplob, there isn't much for documentation outside of the sample scenes as of now, though they are an excellent resource. There is a pretty boring and not too informative API list here.

    @Raziel, sounds good to me. Feel free to shoot over a pull request.
     
  46. raptoplob

    raptoplob

    Joined:
    May 24, 2011
    Posts:
    12
    Sorry Prime, just tried it and I'm not getting it, it's definitely me so apologises!

    Code (csharp):
    1.  
    2. statusButton.uvFrame = "pda_status_active.png";
    3.  
    This gives me "Cannot convert 'String' to 'UIUVRect'." So I guess my question is, how do I make the PNG into a UIUVRect?

    Thanks again
     
  47. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @raptoplob, uvFrame is of type UIUVRect. Have a look at the UIToolkit method textureInfoForFilename. There are numerous examples calling it throughout all the UIElements.
     
  48. actuallystarky

    actuallystarky

    Joined:
    Jul 12, 2010
    Posts:
    188
    @Matkins

    I've found that you can preserve the entire UI hierarchy simply by adding "DontDestroyOnLoad(gameObject);" to anywhere in the awake function of the UI class. The DontDestroyOnLoad property is propergated throughout the entire transform hierarchy, which is really handy in this case.

    It also means you don't need an empty scene for this to work.
     
  49. actuallystarky

    actuallystarky

    Joined:
    Jul 12, 2010
    Posts:
    188
    With the following modifications you can set up your project so that each level loads and plays individually in the editor just fine, your UI isn't destroyed by loads and you'll never have duplicate UI gameobjects in your scene.

    Make the following changes to the start of the UI.cs Awake method (or sub-class UI.cs and make the changes there but you'll have to change the Awake in UI.cs method to protected virtual)

    Code (csharp):
    1.         //  Check to see if there's any other UI objects already in the scene from a previous level
    2.         //  and if so, destroy ourselves
    3.         UI[] uis = FindObjectsOfType(typeof(UI)) as UI[];
    4.         foreach(UI ui in uis)
    5.         {
    6.             if (ui != this)
    7.                 Destroy(gameObject);
    8.         }
    9.        
    10.         // Set instance to this so we can be accessed from anywhere
    11.         instance = this;
    12.                 //  Preserve the entire UI hierarchy between loads
    13.         DontDestroyOnLoad(gameObject);
    and make the following changes to UIToolkit.cs

    add the following private member:

    Code (csharp):
    1.     bool lastInstance = true;
    the following addition to the Awake method

    Code (csharp):
    1.     //  Search for all UI objects in the scene
    2.         UI[] uis = FindObjectsOfType(typeof(UI)) as UI[];
    3.         foreach(UI ui in uis)
    4.         {
    5.             if (ui != transform.parent.GetComponent<UI>())
    6.             {
    7.                 lastInstance = false;
    8.                 Destroy(transform.parent.gameObject);
    9.             }
    10.         }
    and the following change to the OnDestroy method

    Code (csharp):
    1.     protected void OnDestroy()
    2.     {
    3.         if (lastInstance)
    4.         {
    5.             material.mainTexture = null;
    6.             Resources.UnloadUnusedAssets();
    7.         }
    8.     }
    So just wack a UI / UIToolkit setup in each level (making it a prefab really helps) and away you go. I find this really handy for loading screens with animated text and sprites and it's great to be able to run any level independently and get a working UI.

    It won't work if you've got level-specific texture pages set up unfortunately - if anyone has any ideas how to automatically handle that I'm all ears.

    I've only tested this on my own (very small) project this afternoon so if there's any horrible bugs apologies in advance.

    Thanks again to Prime31.
     
  50. Matkins

    Matkins

    Joined:
    Aug 24, 2009
    Posts:
    152
    The "Start" scene method i use is just for avoiding dupes. There's more than just the UI object that i want as persistent singletons.