Why wont my if work ? (C#)
Hi I'm trying to add a parallax to my interface, its all working as intended, but i wanted to add a break so that the objects wont move to far, but for some reason its not working.
Here's my if :
if (panel1.transform.position.x >= 4)
{
trigger = "on";
} else
{
trigger = "off";
}
I'm guessing that for this i wouldn't use transform.position ? Hope i can get some help on this, i realize its probably a simple error, but one i cannot figure out.
Could you tell me more about your project/script ?
I can't give you an answer with as little code, your "if" is valid ^^
Your answer
Follow this Question
Related Questions
Is it possible to get the screen rect for a button regardless of its parent? 1 Answer
Forcing interaction with a gameobject 1 Answer
Scale unity 2020.1 UI EDITOR on linux Mint with XFCE desktop "INCREASE INTERFACE DPI" 0 Answers
How to prevent scroll rect's content from moving after it reached its borders? 0 Answers
UI 5.2.1p4 rect empty 0 Answers