Class SerializedRead
- Namespace
- SurvivorsMaker.Editor
- Assembly
- SurvivorsMaker.Editor.dll
Null-tolerant reads of serialized definition data by field name. Missing or mistyped fields fall back to the given default, so editor UI keeps working while authoring assets gain or rename fields.
public static class SerializedRead
- Inheritance
-
SerializedRead
- Inherited Members
Methods
Bool(SerializedProperty, string, bool)
public static bool Bool(SerializedProperty parent, string name, bool fallback)
Parameters
Returns
Child(SerializedProperty, string)
public static SerializedProperty Child(SerializedProperty parent, string name)
Parameters
parentSerializedPropertynamestring
Returns
- SerializedProperty
Condition(SerializedProperty)
public static TriggerCondition Condition(SerializedProperty p)
Parameters
pSerializedProperty
Returns
Elements(SerializedProperty)
Elements of a serialized array, or an empty list when the array is missing.
public static List<SerializedProperty> Elements(SerializedProperty array)
Parameters
arraySerializedProperty
Returns
- List<SerializedProperty>
Elite(SerializedObject)
public static EliteDef Elite(SerializedObject asset)
Parameters
assetSerializedObject
Returns
Elite(SerializedProperty)
Reads an elite from an EliteDef property or from an elite asset's root iterator (same field names).
public static EliteDef Elite(SerializedProperty p)
Parameters
pSerializedProperty
Returns
Enum<T>(SerializedProperty, string, T)
public static T Enum<T>(SerializedProperty parent, string name, T fallback) where T : struct, Enum
Parameters
parentSerializedPropertynamestringfallbackT
Returns
- T
Type Parameters
T
Float(SerializedProperty, string, float)
public static float Float(SerializedProperty parent, string name, float fallback)
Parameters
Returns
HasRulePayload(TriggerDef)
True when any rule field differs from its default (the payload a rules toggle would activate).
public static bool HasRulePayload(TriggerDef d)
Parameters
Returns
Hit(SerializedProperty)
public static HitEffectDef Hit(SerializedProperty p)
Parameters
pSerializedProperty
Returns
Int(SerializedProperty, string, int)
public static int Int(SerializedProperty parent, string name, int fallback)
Parameters
Returns
Mixed(SerializedProperty, string)
True when the named child is missing or differs across the selected objects.
public static bool Mixed(SerializedProperty parent, string name)
Parameters
parentSerializedPropertynamestring
Returns
Modifier(SerializedProperty)
public static EliteModifier Modifier(SerializedProperty p)
Parameters
pSerializedProperty
Returns
ReferenceName(SerializedProperty)
Display name for an id-backed object reference, e.g. an enemy asset in a spawn entry.
public static string ReferenceName(SerializedProperty reference)
Parameters
referenceSerializedProperty
Returns
RootBool(SerializedObject, string, bool)
public static bool RootBool(SerializedObject asset, string name, bool fallback)
Parameters
Returns
RootFloat(SerializedObject, string, float)
public static float RootFloat(SerializedObject asset, string name, float fallback)
Parameters
Returns
Status(SerializedProperty)
public static StatusEffectDef Status(SerializedProperty p)
Parameters
pSerializedProperty
Returns
String(SerializedProperty, string, string)
public static string String(SerializedProperty parent, string name, string fallback = "")
Parameters
Returns
Trigger(SerializedProperty)
public static TriggerDef Trigger(SerializedProperty p)
Parameters
pSerializedProperty
Returns
Unlock(SerializedProperty)
public static UnlockDef Unlock(SerializedProperty p)
Parameters
pSerializedProperty