When I use code like that
if (cooldown > 1.5)
transform.position.y = new Vector2 (transform.position.x, transform.position.y -= 1);
I get this error "Cannot modify a value type return value of 'UnityEngine.Transform.position'.Consider storing the value in a temporary variable"
I know this is a restriction of C# and how it is solved (it actually tells you what to do" but I just don't know how to do it
Helpz plz
↧