public IfVariableEdgeConditionDrawer(FieldInfo fieldInfo, object value, object parentValue, int arrayIndex) : base(fieldInfo, value, parentValue, arrayIndex) { if (_types == null) { _types = ReflectionDrawerUtility.GetDerivedTypesFrom(typeof(IfVariableEdgeCondition <>), null); } _typeIndex = Mathf.Max(Array.IndexOf(_types.types, value.GetType()), 0); }
public override void Init(NodeBase node, DialogueEditorWindow editor) { base.Init(node, editor); if (_types == null) { _types = ReflectionDrawerUtility.GetDerivedTypesFrom(typeof(SetVariableNode <>), null); } _typeIndex = Mathf.Max(Array.IndexOf(_types.types, node.GetType()), 0); }