Quantcast
Channel: Latest Questions by fishZombie
Viewing all articles
Browse latest Browse all 14

How do you make a global variable, global in Unity?

$
0
0
public float PathLength = 0f; PathLength = PathLength + SegmentLength; This gives me the correct data I want, displayed in the Inspector. I want it displayed in the HUD. So In My HUDScript I wrote this: mytext.text = "Line Length: " + PathLength; I get this error: **error CS0103: The name `PathLength' does not exist in the current context**

Viewing all articles
Browse latest Browse all 14

Trending Articles



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