public override bool OnInspectorDraw(PInspectorCore insp, params object[] arg) { FireFxTreeDebuger d = arg.Length > 0 ? arg[0] as FireFxTreeDebuger : null; switch (insp.propertyName) { case "anim": DrawAnim(d, insp as Insp_TextInput); return(true); case "paramName": DrawParameter(d, insp as Insp_TextInput); return(true); case "paramValue": return(DrawParamValue(insp as Insp_Float)); case "paramType": return(animTarget == AnimatorTarget.Host); case "bone": DrawBone(d, insp as Insp_TextInput); return(true); case "autoBlock": return(actionType != AnimatorActionType.Play); } return(false); }
internal void OnEnable() { _debuger = target as FireFxTreeDebuger; _listDrawer = new ArrayListDrawer("targets"); UpdateHost(); TreeCenter.selection.selectionChanged -= OnSelectChanged; TreeCenter.selection.selectionChanged += OnSelectChanged; }
public override bool OnInspectorDraw(PInspectorCore insp, params object[] arg) { FireFxTreeDebuger d = arg.Length > 0 ? arg[0] as FireFxTreeDebuger : null; if (insp.propertyName == "boneName") { DrawBone(d, insp as Insp_TextInput); return(true); } return(false); }
private void DrawBone(FireFxTreeDebuger d, Insp_TextInput insp) { if (d == null || insp == null || animTarget == AnimatorTarget.Host) { return; } EditorGUI.BeginChangeCheck(); string st = BoneGUI.BoneField(d.hero, insp.label, bone); if (EditorGUI.EndChangeCheck()) { insp.SetValueString(st); } }
private void DrawAnim(FireFxTreeDebuger d, Insp_TextInput insp) { if (d == null || insp == null || actionType != AnimatorActionType.Play) { return; } if (animTarget != AnimatorTarget.Host) { anim = EditorGUILayout.TextField(insp.label, anim); return; } EditorGUI.BeginChangeCheck(); string st = AnimatorGUI.StateField(d.hero, insp.label, anim); if (EditorGUI.EndChangeCheck()) { insp.SetValueString(st); } }
private void DrawParameter(FireFxTreeDebuger d, Insp_TextInput insp) { if (d == null || insp == null || actionType == AnimatorActionType.Play) { return; } if (animTarget != AnimatorTarget.Host) { paramName = EditorGUILayout.TextField(insp.label, paramName); return; } EditorGUI.BeginChangeCheck(); string st = AnimatorGUI.ParameterField(d.hero, insp.label, paramName); if (EditorGUI.EndChangeCheck()) { insp.SetValueString(st); AnimatorControllerParameter p = EditAnimatorUtils.GetAnimParameter(d.hero, st); if (p != null) { paramType = p.type; } } }