public static void closeWindow() { if (caster != null) { caster.Close(); } //it is possible to have stray windows if the user messes with the monitor setup in the OS while the caster window is open casterWindow strayWindow = EditorWindow.GetWindow <casterWindow>(); if (strayWindow != null && strayWindow != caster) //remember the caster is not really destroyed here... editorWindow does not destroyImmediate { strayWindow.Close(); } //stop deforming the output view hypercube.castMesh canvas = GameObject.FindObjectOfType <hypercube.castMesh>(); if (canvas) { canvas.usingCustomDimensions = false; } caster = null; }
public static void saveCubeSettings() { hypercube.castMesh c = GameObject.FindObjectOfType <hypercube.castMesh>(); if (c) { c.saveConfigSettings(); } else { Debug.LogWarning("No castMesh was found, and therefore no saving could occur."); } }
public static void loadHardwareCalibrationSettings() { hypercube.castMesh c = GameObject.FindObjectOfType <hypercube.castMesh>(); if (c) { if (c.loadSettings()) //to prevent spamming, this does not provide feedback when settings are loaded { Debug.Log("Hypercube settings loaded."); } } else { Debug.LogWarning("No castMesh was found, and therefore no loading occurred."); } }