Hello Guest

Author Topic: Window Script  (Read 6832 times)

ironquark

  • Newbie
  • *
  • Posts: 14
    • View Profile
Window Script
« 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
« Last Edit: October 28, 2017, 09:40:03 pm by ironquark »

ironquark

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Window Script
« Reply #1 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?

ironquark

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Window Script
« Reply #2 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?

ironquark

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Window Script
« Reply #3 on: November 01, 2017, 01:06:07 pm »
For a while I'm using this solution:

GameObject.Find ("Window").SetActive(false);

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Window Script
« Reply #4 on: November 11, 2017, 10:09:50 pm »
Hi,
Did you try that thing I suggested in the email?

Pongganut

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Window Script
« Reply #5 on: November 21, 2017, 05:23:31 am »
Thanks to everyone for the code, it was very helpful to me.