2D Toolkit Forum

2D Toolkit => Support => Topic started by: ironquark on October 28, 2017, 09:17:13 pm

Title: Window Script
Post by: ironquark on October 28, 2017, 09:17:13 pm
Hi

I'm using Window script from 2dtoolkit,

How to hide/show the window with all objects?

I need to know the class name of window script, to hide and show the window on a button.

See image:
https://imgur.com/2omAyIG
https://imgur.com/ZnKzLuH


Thanks
Title: Re: Window Script
Post by: ironquark on October 29, 2017, 11:58:04 am
With this line:

   Button1 = GameObject.Find("ToggleButton1").GetComponent<tk2dUIToggleButton>();

I can acess the button with the class tk2dUIToggleButton, what is the name of the class for the Window?
Title: Re: Window Script
Post by: ironquark on October 29, 2017, 12:10:56 pm
With this:

      mywindow = GameObject.Find ("Window").GetComponent<tk2dUILayout>();

I'm able to acess the component window, my question is, How to hide/show the window?
Title: Re: Window Script
Post by: ironquark on November 01, 2017, 01:06:07 pm
For a while I'm using this solution:

GameObject.Find ("Window").SetActive(false);
Title: Re: Window Script
Post by: unikronsoftware on November 11, 2017, 10:09:50 pm
Hi,
Did you try that thing I suggested in the email?
Title: Re: Window Script
Post by: Pongganut on November 21, 2017, 05:23:31 am
Thanks to everyone for the code, it was very helpful to me.