Class TriggerDefDrawer

Namespace
SurvivorsMaker.Editor
Assembly
SurvivorsMaker.Editor.dll

"When X, with chance C, do Y". When the owning asset turns on UseTriggerRules, a Rules section adds the event, conditions, counter, firing limits, filters and damage scaling. Inline warnings reuse the owner's Validate() issues for this entry, plus a note when rule fields are set but the toggle is off.

[CustomPropertyDrawer(typeof(TriggerDef))]
public sealed class TriggerDefDrawer : PropertyDrawer
Inheritance
GUIDrawer
PropertyDrawer
TriggerDefDrawer
Inherited Members
PropertyDrawer.OnGUI(Rect, SerializedProperty, GUIContent)
PropertyDrawer.GetPropertyHeight(SerializedProperty, GUIContent)
PropertyDrawer.CanCacheInspectorGUI(SerializedProperty)
PropertyDrawer.attribute
PropertyDrawer.fieldInfo
PropertyDrawer.preferredLabel

Constructors

TriggerDefDrawer()

public TriggerDefDrawer()

Fields

RulesToggle

public const string RulesToggle = "UseTriggerRules"

Field Value

string

Methods

CreatePropertyGUI(SerializedProperty)

public override VisualElement CreatePropertyGUI(SerializedProperty property)

Parameters

property SerializedProperty

Returns

VisualElement