public override void OnInspectorGUI() { DrawDefaultInspector(); BlendShapeManager bScript = (BlendShapeManager)target; if (GUILayout.Button("Setup")) { bScript.CountBlendShapes(); } expressionName = GUILayout.TextField(expressionName); if (GUILayout.Button("Create expression")) { bScript.CreateExpression(expressionName); } else if (GUILayout.Button("Set expression")) { bScript.SetExpressionImmediate(expressionName); } else if (GUILayout.Button("Reset")) { bScript.ResetShapes(); } }
private void Awake() { animator = GetComponentInChildren <Animator>() ?? GetComponent <Animator>(); blendShapeManager = GetComponent <BlendShapeManager>(); audioSource = GetComponent <AudioSource>(); hazard = GetComponent <Hazard>(); navAgent = GetComponent <NavMeshAgent>(); triggerNotify = GetComponent <TriggerNotify>(); startTransform = transform; }
private void OnEnable() { BlendShapeManager bScript = (BlendShapeManager)target; bScript.CountBlendShapes(); }