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

component not detecting parent class

$
0
0
Say I have **class A.** Then I make **class B** that inherits from **class A.** I put the **class B** script on a gameobject in the scene. I have a separate gameobject that has a component on it. this component expects a reference to **Class A.** i.e. *public A testVar;* I try to drag and drop the gameobject with **class B** attached to it into the reference field of the component. However it doesn't work. Why not? Shouldn't it be fine since it extends to the class it expects? Any wisdom is most appreciated.

Viewing all articles
Browse latest Browse all 131

Trending Articles



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