FlaxEngine
FlaxEngine copied to clipboard
[ BUG ] Prefabs on scene lose changes (caused by arrays)
Sometimes i lose some prefab changes when i have scripts with arrays.
https://github.com/user-attachments/assets/76730095-6321-4809-b3e4-7d02d026172e
My code:
using FlaxEngine;
namespace Game;
public class TestArray : Script
{
public struct Struct
{
public Actor A;
public int B;
}
public Struct[] MyArray2;
}
Version: Master
Make sure you use the Serializable attribute on your struct.
@Tryibion i tried this but does not work too:
[System.Serializable]
public struct Struct
{
[Serialize] public Actor A;
[Serialize] public int B;
}