Quantcast
Channel: Questions in topic: "get"
Viewing all articles
Browse latest Browse all 215

Get gameObjects from a protected GameObject array of base class in derived class

$
0
0
I have a `StageScript` in which I am filling an array in the inspector named `UnorthodoxSeats` marking it as `[SerializeField] protected GameObject[] UnorthodoxSeats` in the script. When the script runs, after some time a Character is instantiated to move towards the seat. The Character has also a script named `CharacterScript` which is the derived class of `StageScript`. Now, In the `CharacterScript` whenever I get `UnorthodoxSeats.Length` it shows `0`. I am confused why? Any help would be awesome.

Viewing all articles
Browse latest Browse all 215

Trending Articles



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