Im having a class where i simulate enums like in java.
Its basically an array of elements
public T[ ] enumList;
which gets filled by its subclass. The index is the enums int value.
I didnt do a build for a month and meanwhile upgraded to the 2019 version.
When i tried to do a build i suddenly got an crash in most of my scenes.
After numerous tests i figured out the EnumListDrawerGeneric<T, E> : MonoBehaviour lead to that error.
Im having a scene with a single gameobject and a single mono: DataChickenMamaColorsTypes.
When the enumlist has no elements no errors are printed.
When it has 1 -4 elements i get this msg:
2019.10.30 15:16:52.101 15249 17066 Error Unity: A scripted object (probably DataChickenMamaColorsTypes?) has a different serialization layout when loading. (Read 132 bytes but expected 148 bytes)
2019.10.30 15:16:52.101 15249 17066 Error Unity: Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?
When it has about 8 elements:
Trying to allocate: 1936617316B with 16 alignment. MemoryLabel: String
2019.10.30 13:47:02.510 28034 30257 Error Unity: Allocation happened at: Line:314 in ./Runtime/Core/Containers/StringStorageDefault.h
I dont use UNITY_EDITOR in those files. Ill create a empty project later end check this out again.
Has anyone experienced similar behaviour?
It seems as if the generic array stuff
public T[ ] enumList; leads to that error? Which used to be an error in older unity versions?
Edit: an other subclass with lots of elements didnt cause any troubles. it may be some problems with one of the attributes. gona investigate later