edited March 2015 in ORK Scripting
im still at a loss on this now that i have time to work on my own stuff again i cant seem to pull this from script at all the CloseBox function from the guibox component.
Post edited by wtyson on
new website can be found here http://www.fore-loregames.com

Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games

or check out the face book page here https://www.facebook.com/ForeLoreGames
  • Get the GUIBoxComponent component from the game object in the new UI and call the CloseBox function:

    GUIBoxComponent box = gameObject.GetComponent<GUIBoxComponent>();
    if(box != null) box.CloseBox();


    Of course, you'll need to have the correct game object with that component attached :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • ok so this dosent fully close the menu i made a script an i add it to the object with the gui box component this is all done at run time and itll bring up a message asking me to hit yes or no and if i hit yes the box disappears but when i load back into the main menu an hit play it acts if the menu is still there as if camera and controls are still being blocked
    new website can be found here http://www.fore-loregames.com

    Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games

    or check out the face book page here https://www.facebook.com/ForeLoreGames
  • Closing the box will not in all cases also close the menu backend. You should probably just close the menu directly, as we've discussed in earlier topics.

    E.g. closing the save game menu (where box is again the GUIBoxComponent):
    ORK.SaveGameMenu.loadMenu.Canceled(box.GUIBox);
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • yep that worked just as in tended .......thanks gil
    new website can be found here http://www.fore-loregames.com

    Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games

    or check out the face book page here https://www.facebook.com/ForeLoreGames
Sign In or Register to comment.