/// <summary> /// Set the morph's weight to 1 and all others to 0 /// </summary> /// <param name="morphName">The name of the morph which should be set to 1</param> public void SetMorphState(string morphName) { if (!hasMorph) { return; } string[] morphNames = _morph.GetChannelNames(); for (int i = 0; i < morphNames.Length; i++) { if (morphNames[i] == morphName) { SetMorphState(i); return; } } Debug.LogError("Morph state " + morphName + " not found"); }