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

Why i get UnassignedReferenceException while using Update/Start etc functions ?

$
0
0
I have a simple script: public GameObject icon; void Update() { Debug.Log(icon.name); } Then i assign Icon GameObject in Unity inspector (when i click on this field while runtime, it's pointing to exact object). But i still recieving this error despite having right feedback in console: Icon UnityEngine.Debug:Log (object) Interactable:Start () (at Assets/Scripts/Interactable.cs:18) I tried: renaming Icon object, reloading Unity, recreate Icon object completly. One more thing - when i put this Debug piece of code in different function (like OnMouseOver) in the same script it's works as intended. So where i'm wrong?

Viewing all articles
Browse latest Browse all 2891

Trending Articles



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