syabhri
1
while I created an Instance of ScriptableObject with a class variable in it, in the inspector it shows the class variable as default instance of the class, do I still need to add a null checker before getting data from it?

[CreateAssetMenu(menuName = "VariableContainer/TimeContainer")]
public class TimeContainer : VariableContainer<TimeFormat>
{
public Action<TimeContainer> OnValueChanged = delegate { };
public override TimeFormat Value
{
set { this.value = value; OnValueChanged.Invoke(this); }
get { return value; }
}
public void Reset()
{
Value.Reset();
}
}
if it gets serialize, you dont need to, similar to how when you mark a list public like
public List<string> example;//gets serialize in inspector
you dont need to initialize it
public List<string> example = new List<string>();