Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

Using vector2 (transform.position.x, transform.position.y -= 1) error

$
0
0
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

Viewing all articles
Browse latest Browse all 7934

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>