Hide And Show
What Is The Hide And Show Asset?
How Do You Use It?
1. To use the hide and show asset asset, drag and drop the hide script onto an empty GameObject.
2. Create a circle sprite.
3. Create A Button.
4. Select the button and scroll down to the ‘On Click()’ function.
5. Press the small + icon in the ‘On Click()’ tab.
6. Drag in the GameObject you created from the first step. Also, a good idea would be to rename it to something like: ‘Hide&Show Manager’.
7. Click on ‘No Function’ and change it to be ‘Hide > Hide Object()’.
8. Go back to the Hide&Show manager and drag the circle into the ‘Object To Hide’ slot, you could rename that to ‘Circle to hide’.
9. You’re done! Now a good idea would be to rename the button text to hide and the button name too. You could also change the button color to be red!
10. You can do almost that exact same thing for all the other scripts. If you want for info check out the video on the asset store page for ‘Show And Hide’, or look at the examples.
Create Your Own
Create your own buttons to hide UI and GameObjects! This is great for almost all genres, though it would work especially well in a puzzle game. With a simple pause script, you could even make a Pause Menu!
Works With UI
Works with every single GameObject, UI and every other thing you could think of.
Example Project Included
A UI example, and in the future, a 2D and 3D example.
Seven scripts, Hide, HideAndShow, HideOnStart, HideThenShow, Show, ShowOnStart, and ShowThenHide.
Hide And Show Versions
I would consider this to be a preview package. It works with unity 2020.2 and later. There’s currently seven scripts and one UI example scene. More example scenes coming in the future, for example a trigger scene. New scripts are coming, maybe some creating and removing scripts. Not yet able to be run on Unity 2019 yet. I am also planning to make it just one script that you can change.