Quantcast
Channel: Questions in topic: "class instance"
Viewing all articles
Browse latest Browse all 131

Instantiate a class type from inside a variable?

$
0
0
Hi, I have a few Boss AI classes that inherit from the class Boss. In inspector, I can drag in a BossAI script as an object (BossClass), but I'm not able to properly instantiate it. ![alt text][1] this compiles but throws this error: "NullReferenceException: Object reference not set to an instance of an object" [1]: /storage/temp/197344-f20cbf0fd21410ccce7d5d7da15ce6e0.png

Viewing all articles
Browse latest Browse all 131

Trending Articles



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