Added morph clear button
removed redundant property
This commit is contained in:
@@ -1043,4 +1043,23 @@ public class UmaViewerBuilder : MonoBehaviour
|
||||
Destroy(CurrentUMAContainer.gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
public void ClearMorphs()
|
||||
{
|
||||
if (CurrentUMAContainer != null && CurrentUMAContainer.FaceDrivenKeyTarget != null)
|
||||
{
|
||||
foreach (var container in UI.EmotionList.GetComponentsInChildren<UmaUIContainer>())
|
||||
{
|
||||
if (container.Slider != null)
|
||||
container.Slider.value = 0;
|
||||
}
|
||||
foreach (var container in UI.FacialList.GetComponentsInChildren<UmaUIContainer>())
|
||||
{
|
||||
if (container.Slider != null)
|
||||
container.Slider.SetValueWithoutNotify(0);
|
||||
}
|
||||
CurrentUMAContainer.FaceDrivenKeyTarget.ClearMorph();
|
||||
CurrentUMAContainer.FaceDrivenKeyTarget.ChangeMorph();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user