void OnEnable() { if (lipSync.profile == null) { lipSync.profile = EditorUtil.FindAsset <Profile>(Common.defaultProfileWoman); } if (lipSync.config == null) { lipSync.config = EditorUtil.FindAsset <Config>(Common.defaultConfig); } }
void DrawSetProfileButtons() { EditorGUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); if (GUILayout.Button("Man", EditorStyles.miniButtonLeft, GUILayout.Width(80))) { lipSync.profile = EditorUtil.FindAsset <Profile>(Common.defaultProfileMan); } if (GUILayout.Button("Woman", EditorStyles.miniButtonMid, GUILayout.Width(80))) { lipSync.profile = EditorUtil.FindAsset <Profile>(Common.defaultProfileWoman); } if (GUILayout.Button("Create", EditorStyles.miniButtonRight, GUILayout.Width(80))) { lipSync.profile = EditorUtil.CreateAssetInRoot <Profile>($"{Common.assetName}-Profile-New"); } EditorGUILayout.EndHorizontal(); }
void DrawSetConfigButtons() { EditorGUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); if (GUILayout.Button("Default", EditorStyles.miniButtonLeft, GUILayout.Width(80))) { lipSync.config = EditorUtil.FindAsset <Config>(Common.defaultConfig); } if (GUILayout.Button("Calibration", EditorStyles.miniButtonMid, GUILayout.Width(80))) { lipSync.config = EditorUtil.FindAsset <Config>(Common.calibrationConfig); } if (GUILayout.Button("Create", EditorStyles.miniButtonRight, GUILayout.Width(80))) { lipSync.config = EditorUtil.CreateAssetInRoot <Config>($"{Common.assetName}-Config-New"); } EditorGUILayout.EndHorizontal(); }