Skip to content

ScriptableValue Class

Base class for all ScriptableValue<T>.

C#
[HelpURL("https://hertzole.github.io/scriptable-values/types/scriptable-value")]
public abstract class ScriptableValue : RuntimeScriptableObject, INotifyPropertyChanging, INotifyPropertyChanged, IStackTraceProvider, ICanBeReadOnly

Inheritance object → UnityEngine.Object → UnityEngine.ScriptableObject → RuntimeScriptableObject

Implements INotifyPropertyChanging, INotifyPropertyChanged, IStackTraceProvider, ICanBeReadOnly

You should probably inherit from ScriptableList<T> instead.

C#
public static readonly PropertyChangingEventArgs isReadOnlyChangingArgs
C#
public static readonly PropertyChangedEventArgs isReadOnlyChangedArgs
C#
public static readonly PropertyChangingEventArgs resetValueOnStartChangingArgs
C#
public static readonly PropertyChangedEventArgs resetValueOnStartChangedArgs
C#
public static readonly PropertyChangingEventArgs setEqualityCheckChangingArgs
C#
public static readonly PropertyChangedEventArgs setEqualityCheckChangedArgs
C#
public static readonly PropertyChangingEventArgs valueChangingArgs
C#
public static readonly PropertyChangedEventArgs valueChangedArgs
C#
public static readonly PropertyChangingEventArgs previousValueChangingArgs
C#
public static readonly PropertyChangedEventArgs previousValueChangedArgs
C#
public static readonly PropertyChangingEventArgs defaultValueChangingArgs
C#
public static readonly PropertyChangedEventArgs defaultValueChangedArgs

If read only, the value cannot be changed at runtime.

C#
[CreateProperty]
public bool IsReadOnly { get; set; }

If true, the value will be reset to the default value on play mode start/game boot.

C#
[CreateProperty]
public bool ResetValueOnStart { get; set; }

If true, an equality check will be run before setting the value to make sure the new value is not the same as the old one.

C#
[CreateProperty]
public bool SetEqualityCheck { get; set; }