void AssetManagment(BuildTarget target, string path) { if (target == BuildTarget.Android) { if (Application.unityVersion.StartsWith("2017.") || Application.unityVersion.StartsWith("2018.")) { if (!File.Exists(aar2017) && File.Exists(aar2017 + ".skip")) { try { File.Move(aar2017 + ".skip", aar2017); AssetDatabase.Refresh(); } catch (Exception e) { Debug.LogWarning("Caught " + e.ToString() + " while moving \"" + aar2017 + ".skip" + "\" to \"" + aar2017 + "\""); } } skip = aar5; } else { if (!File.Exists(aar5) && File.Exists(aar5 + ".skip")) { try { File.Move(aar5 + ".skip", aar5); AssetDatabase.Refresh(); } catch (Exception e) { Debug.LogWarning("Caught " + e.ToString() + " while moving \"" + aar5 + ".skip" + "\" to \"" + aar5 + "\""); } } skip = aar2017; } recovery = skip + ".skip"; if (File.Exists(skip)) { //Debug.Log("Skip " + skip); try { File.Move(skip, recovery); AssetDatabase.Refresh(); } catch (Exception e) { Debug.LogWarning("Caught " + e.ToString() + " while moving \"" + skip + "\" to \"" + recovery + "\""); } } EditorWindow tmp = EditorWindow.focusedWindow; WaveVRAttributesWindow window = (WaveVRAttributesWindow)EditorWindow.GetWindow(typeof(WaveVRAttributesWindow), true, "WaveVR Attributes", false); forceUpdateWaveVRAttributes = true; window.Show(); if (tmp != null) { tmp.Focus(); } } }
static void Init() { EditorWindow tmp = EditorWindow.focusedWindow; // Get existing open window or if none, make a new one: WaveVRAttributesWindow window = (WaveVRAttributesWindow)EditorWindow.GetWindow(typeof(WaveVRAttributesWindow), true, "WaveVR Attributes", false); window.position = new Rect(Screen.width / 10, Screen.height / 10, 320, 240); forceUpdateWaveVRAttributes = true; window.Show(); tmp.Focus(); }
void AssetManagment(BuildTarget target, string path) { if (target == BuildTarget.Android) { findAndroidManifestFiles(); buildAndroidVive = false; buildAndroidOculus = false; buildAndroidDaydream = false; #if UNITY_2017_2_OR_NEWER var devices = XRSettings.supportedDevices; #else var devices = VRSettings.supportedDevices; #endif foreach (var dev in devices) { var lower = dev.ToLower(); if (lower.Equals("daydream")) { buildAndroidDaydream = true; } if (lower.Equals(WVRSinglePassDeviceName)) { buildAndroidVive = true; } if (lower.Equals("oculus")) { buildAndroidOculus = true; } } if (buildAndroidVive || (!buildAndroidOculus && !buildAndroidDaydream)) { copyAndroidManifest(); enableGoogleVRAars(false); enableWaveVRAars(true); enableOculusVRAars(false); EditorWindow tmp = EditorWindow.focusedWindow; WaveVRAttributesWindow window = (WaveVRAttributesWindow)EditorWindow.GetWindow(typeof(WaveVRAttributesWindow), true, "WaveVR Attributes", false); forceUpdateWaveVRAttributes = true; window.Show(); if (tmp != null) { tmp.Focus(); } } } }