Quantcast
Channel: Latest Questions by jpenca
Viewing all articles
Browse latest Browse all 16

NullReference in Start() or Awake() when testing on Android device, works fine in Editor

$
0
0
i'm getting a weird null reference exception when i debug my app on device (Asus Transformer Prime). This happens in app initialization, both in Start() and Awake(). The Transform is being assigned in the Inspector, and when launching the app in the Editor it works fine, i get a reference to the Transform as expected, while on the device i get a null reference. public Transform weirdObject; void Awake() { if(this.weirdObject == null) Debug.Log("meh. null."); else Debug.Log("yea it's not null"); }

Viewing all articles
Browse latest Browse all 16

Trending Articles



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