- Home /
Simple progress bar/timer
This is basically what Im trying to do:
Click an object
Start a progress bar
When it stops, instantiate another object and set progress bar to 0
Click the object again, repeat
Question 1: Can I use a timer to fill the progress bar using GUI?
Question 2: If I put this script on my object, how do I check if the object has been clicked using another script?
Answer by siddharth3322 · Aug 27, 2014 at 02:03 AM
I try to give your both questions answer.
You can create simple progress bar using GUITexture that totally depends on you which object you want to use.
In your other script you have to manage variable that define whether button is clicked or not. Using GetComponent you can access particular script and in that particular variable.
Thanks. I figured out the GUI timer. Now working on understanding GetComponent.
Your answer
![](https://koobas.hobune.stream/wayback/20220613161625im_/https://answers.unity.com/themes/thub/images/avi.jpg)