static void PerformFirstTimeSetup() { SKSEditorUtil.AddDefine(projectSymbol, GetGroupFromBuildTarget(EditorUserBuildSettings.activeBuildTarget)); EditorPrefs.SetBool(_performingFirstTimeSetup, true); EditorPrefs.DeleteKey(_ignoreSetup); //Create the default tags and layers GenTagDatabase(); ReassignPrefabLayers(); }
public static void ApplyVR(bool includeVRTK) { EditorUtility.DisplayProgressBar("Applying VR Presets...", "", 1f); if (includeVRTK) { Logger.Log("Importing VRTK"); EditorPrefs.SetInt(_importingVRTK, 2); var vrtkPath = Directory.GetFiles("Assets", "vrtk.unitypackage", SearchOption.AllDirectories); if (vrtkPath.Length > 0) { AssetDatabase.ImportPackage(vrtkPath[0], false); //AssetDatabase.Refresh(); } else { // failed to find vrtk package } } else { // if the user decides to set VR mode without importing VRTK the compile flags can cause errors/ // detect those errors and let the user know the problem. if (!VRTKIsMaybeInstalled) { ConsoleCallbackHandler.AddCallback(HandleVRTKImportError, LogType.Error, "CS0246"); } } var vrtkSupportPath = Directory.GetFiles("Assets", "vrtk_support.unitypackage", SearchOption.AllDirectories); if (vrtkSupportPath.Length > 0) { AssetDatabase.ImportPackage(vrtkSupportPath[0], false); AssetDatabase.Refresh(); } else { // failed to find vrtk_support package } EditorPrefs.SetBool(_performingSetup, true); if (!projectInitialized) { PerformFirstTimeSetup(); } SKSEditorUtil.AddDefine(vrSymbol); }
static void PerformFirstTimeSetup() { Logger.Log("performing first-time setup"); SKSEditorUtil.AddDefine(projectSymbol); EditorPrefs.SetBool(_performingFirstTimeSetup, true); EditorPrefs.DeleteKey(_ignoreSetup); CreateLayer("Player"); CreateLayer("Portal"); CreateLayer("PortalPlaceholder"); CreateLayer("PortalOnly"); CreateLayer("RenderExclude"); CreateTag("PhysicsPassthroughDuplicate"); CreateTag("SKSEditorTemp"); ReassignPrefabLayers(); }