Making UI images appear disappear
Hello! So basically, I have around 37 images inside canvas which are appearing and disappearing continuously. Now i want to make the canvas disappear when speed of a certain exceeds a certain value and reappear when the speed become zero or less than the threshold value. I am successfully able to make canvas disappear but it doesnt reappear. There are two types of images inaide canvas 1. 37 arrows 2. An image of a speedometer
I tried using my logic on speedometer and it works i.e the meter appears and disappears perfectly but for some reason things don't work in case of arrows (it maybe because the arrows are already appearing and disappearing). Any suggestions on how i can make canvas appear and disappear perfectly
P.S the enable disable script is attached with the sphere with canvas as reference inside script.
Can you show us the part of the code that disables/enables the canvas?
Sure.
Public GameObject canvas; void start() {
} void FixedUpdate() { In this function I have the code to make ball move using vector 3
Then as for canvas if (speed > 0.001) canvas.SetActive(false);
if (speed < 0.001)
canvas.SetActive(true);
Here speed is the variable controlling speed of the sphere.
} @$$anonymous$$