Array2DEditor
Array2DEditor copied to clipboard
Serializable class
Hey there,
Amazing plugin and I'm really happy with it.
I've managed to create an Array 2d of custom scriptable object classes, but I have a problem if I try to create Array2d of a serializable class.
Basically is this possible?
[Serializable]
public class Array2DTest : Array2D<Test>
[Serializable]
public class Test
[CustomPropertyDrawer(typeof(Array2DTest))]
public class Array2DTestDrawer : Array2DDrawer
{
protected override object GetDefaultCellValue() => new Test();
protected override object GetCellValue(SerializedProperty cell) => cell.managedReferenceValue;
protected override void SetValue(SerializedProperty cell, object obj)
{
cell.managedReferenceValue = (Test) obj;
}
}