private object getActionVar() { DynamicAction action = LegacyEditorData.instance.currentAction; if (varSource == DataInputVarSource.FIELD) { object actionVar = action.GetType().GetField(varName).GetValue(action); if (actionVar != null) { switch (varType) { case VarType.BOOL: return((bool)actionVar); case VarType.INT: return((int)actionVar); case VarType.FLOAT: return((float)actionVar); default: return((string)actionVar); } } else { Debug.LogWarning("Action " + action.name + " has null value for var: " + varName); return(""); } } return(""); }
private bool getActionVar() { DynamicAction action = LegacyEditorData.instance.currentAction; if (action.name != "") { if (varSource == ActionVarType.FIELD) { return((bool)action.GetType().GetField(varName).GetValue(action)); } } //else //{ //return action.GetVar(varName); //} return(false); }
private void setActionVar(object valueToSet) { DynamicAction action = LegacyEditorData.instance.currentAction; action.GetType().GetField(actionVar).SetValue(action, valueToSet); }
private object getActionVar() { DynamicAction action = LegacyEditorData.instance.currentAction; return(action.GetType().GetField(actionVar).GetValue(action)); }