- Home /
Question by
l8g · Nov 21, 2019 at 06:30 AM ·
serializationscriptableobject
Field is member of a type which is serializable but is of type which is not serializable
[System.Serializable]
public class B
{
public TextAsset track;
public Vector3 pos;
}
public class A : ScriptableObject
{
public List<B> b;
}
I use ScriptableObject to save data like this, but I don't want B is a subclass of ScriptableObject since I have to save it to a separated file. So I used Serializable attribute. It save data correctly but with a warning in Visual Studio, Reading "Field is member of a type which is serializable but is of type which is not serializable".
Is there Any potential risk when I use like this ? thanks a lot.
Comment