Closed Luxulicious closed 4 years ago
I'm looking into this now - I don't get the error you get, but I get a different one saying the serializedproperty has "disappeared". This seems to be a new issue - arrays of SmartRefs definitely worked before!
This should be fixed in the latest release - please let me know if not!
I was hoping to keep a collection of references to several BoolVars within the same
MonoBehaviour
. I tried usingBoolReader
array for this, but it won't serialize in the inspector correctly.For example the following code won't serialize properly in the inspector:
[SerializeField] private BoolReader[] readers;
When trying to add a new item from the inspector the following error occurs: https://pastebin.com/hWH7bax5
I've tried using
BoolMultiReader
instead, but in my particular case I want to iterate over all the elements in theBoolMulti
and haven't found a way how to yet. Since I can't reference all values in theBoolMulti
from theBoolMultiReader
(to my knowledge).Ultimately my question is, if there is a way I could iterate over the
BoolMulti
from aBoolMultiReader
or a way to serialize an array ofBoolReader
s?(My temporary fix has been referencing the BoolMulti directly)