Quantcast
Channel: Latest Questions by hardmode2236
Viewing all articles
Browse latest Browse all 112

array resetting after enabling a disabled gameobject

$
0
0
my bow script has an array of arrows with length of 3, the bow starts disabled; then when i enable it the array is length 0. i even have this line in Start(): arrows = new Rigidbody[3]; and arrows still resets to 0 atfer enabling it. kind of a side question here: does Start() even run when an already instantiated object is re enabled? if not that line wouldn't help anyway i guess. and main question, does anyone know why the array would be resetting its length like this? side note: this only happens when the bow starts the game disabled, then i enabled by switching to it. if it starts enabled, i can switch back and forth no problem.

Viewing all articles
Browse latest Browse all 112

Trending Articles



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