Quantcast
Channel: Answers by "maxnorth"
Viewing all articles
Browse latest Browse all 8

Answer by maxnorth

$
0
0
I figured out the problem, and it has to do with the way that the serializer works with default constructors. I was able to make the array have the correct length in two ways: 1) by marking each field with a NonSerializableAttribute (which was not ideal because at the very least I want users to be able to modify the class from the Inspector), and 2) by not having a default constructor with the AddToStaticArray() method. Even when I wasn't using the default constructor to initialize my fields, the serializer was calling it multiple times, apparently. So, since I wanted to keep serialization, I decided to forego the default constructor.

Viewing all articles
Browse latest Browse all 8

Latest Images

Trending Articles





Latest Images

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