public static SkillTexture FsmTextureField(GUIContent label, Skill fsm, SkillTexture fsmObject) { if (label == null) { label = GUIContent.none; } EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]); if (fsmObject.get_UseVariable()) { fsmObject = VariableEditor.DoFsmTexturePopup(label, fsm, fsmObject); } else { EditorGUILayout.PrefixLabel(label); fsmObject.set_Value((Texture)EditorGUILayout.ObjectField(fsmObject.get_Value(), typeof(Texture), !SkillEditor.SelectedFsmIsPersistent(), new GUILayoutOption[] { GUILayout.Width(80f), GUILayout.Height(80f) })); GUILayout.FlexibleSpace(); } fsmObject = (SkillTexture)VariableEditor.VariableToggle(fsmObject, label.get_text()); VariableEditor.EndVariableEditor(fsmObject); return(fsmObject); }
public static SkillTexture FsmTexturePopup(GUIContent label, Skill fsm, SkillTexture fsmObject) { EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]); fsmObject = VariableEditor.DoFsmTexturePopup(label, fsm, fsmObject); VariableEditor.EndVariableEditor(fsmObject); return(fsmObject); }