public static SkillMaterial FsmMaterialPopup(GUIContent label, Skill fsm, SkillMaterial fsmObject) { EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]); fsmObject = VariableEditor.DoFsmMaterialPopup(label, fsm, fsmObject); VariableEditor.EndVariableEditor(fsmObject); return(fsmObject); }
public static SkillMaterial FsmMaterialField(GUIContent label, Skill fsm, SkillMaterial fsmObject) { if (label == null) { label = GUIContent.none; } EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]); if (fsmObject.get_UseVariable()) { fsmObject = VariableEditor.DoFsmMaterialPopup(label, fsm, fsmObject); } else { fsmObject.set_Value((Material)EditorGUILayout.ObjectField(label, fsmObject.get_Value(), typeof(Material), !SkillEditor.SelectedFsmIsPersistent(), new GUILayoutOption[0])); } fsmObject = (SkillMaterial)VariableEditor.VariableToggle(fsmObject, label.get_text()); VariableEditor.EndVariableEditor(fsmObject); return(fsmObject); }