Quantcast
Viewing all articles
Browse latest Browse all 4

Answer by robertbu

Transforms[0] = GameObject.Find("anything").transform; Your question is confusing. You can execute the line you specify using 'Player' as long as a game object with the name 'Player' exists at the time the line is executed. If it does not exist, then this line will generate a null reference exception. Also note that by convention, variables should start with a lower case letter. "radarscript doesn't exist in the current context". Missing classes will happen if you don't have things compiled in the right order. The typical solution is to move any C# files that need to be access from Javascript into StandardAssets. http://docs.unity3d.com/Manual/ScriptCompileOrderFolders.html

Viewing all articles
Browse latest Browse all 4

Trending Articles



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