1
\$\begingroup\$

I want to display the final results at last in the game when gameobjects finish the winning(finish) line. For that I am using canvas and in that a panel onto which an image is attached. I have to hide that canvas at start of the game and then show when gameobjects cross the last finish line. How can I do this..? Please if anyone has an idea about this can help me. Thanks in advance :)

\$\endgroup\$
  • \$\begingroup\$ Did you try to disable gameobject of panel? \$\endgroup\$ – Hamza Hasan Dec 28 '15 at 9:39
  • \$\begingroup\$ No...But how to find the panel in start..? \$\endgroup\$ – Shraddha Patel Dec 28 '15 at 9:46
  • \$\begingroup\$ Like any other GameObject, you should be able to assign it from the editor (the inspector) to the script. In your script you show and hide it using SetActive on the GameObject. \$\endgroup\$ – Athos vk Dec 28 '15 at 10:13
1
\$\begingroup\$

Make a variable public GameObject panel , in the script from which you want to disable the panel. Drag and drop the panel into the variable script in inspector. Disable the panel from inspector. On win do panel.SetActive(true);

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.