private void InitializeIkStatus() { string[] scriptingDefineSymbols = PlayerSettings.GetScriptingDefineSymbolsForGroup(BuildTargetGroup.Standalone).Split(SymbolSeparator); // Initialize avatar status IkController ikController = (IkController)target; ikController.isFinalIkUsed = scriptingDefineSymbols.Contains(DefineVRIK); ikController.EnableDisableAvatars(); }
public override void OnInspectorGUI() { base.OnInspectorGUI(); GUILayout.Space(10); EditorGUILayout.BeginHorizontal(); { GUILayout.FlexibleSpace(); if (GUILayout.Button("Use FinalIK", GUILayout.Width(100), GUILayout.Height(40))) { IkController ikController = (IkController)target; if (ikController.isFinalIkUsed) { Debug.LogWarning("Already using Final IK"); return; } ikController.isFinalIkUsed = true; ikController.EnableDisableAvatars(); UpdateScriptingDefineSymbolList(DefineVRIK, true); } GUILayout.Space(20); if (GUILayout.Button("Use SimpleIK", GUILayout.Width(100), GUILayout.Height(40))) { IkController ikController = (IkController)target; if (!ikController.isFinalIkUsed) { Debug.LogWarning("Already using Simple IK"); return; } ikController.isFinalIkUsed = false; ikController.EnableDisableAvatars(); UpdateScriptingDefineSymbolList(DefineVRIK, false); } GUILayout.FlexibleSpace(); } EditorGUILayout.EndHorizontal(); GUILayout.Space(10); }