static void Init() { // Debug.Log("AutoSnap: Init"); AutoSnap window = (AutoSnap)EditorWindow.GetWindow(typeof(AutoSnap), false, "Auto Snap", true); window.Show(); }
static void Init() { // Debug.Log("AutoSnap: Init"); AutoSnap window = (AutoSnap)EditorWindow.GetWindow(typeof(AutoSnap)); window.maxSize = new Vector2(200, 125); window.Show(); }
public void OnDisable() { EditorPrefs.SetBool(doSnapKey, doSnap); EditorPrefs.SetBool(doScaleSnapKey, doScaleSnap); EditorPrefs.SetBool(doRotateSnapKey, doRotateSnap); EditorPrefs.SetFloat(snapValueXKey, snapValueX); EditorPrefs.SetFloat(snapValueYKey, snapValueY); EditorPrefs.SetFloat(snapValueZKey, snapValueZ); EditorPrefs.SetFloat(snapRotateValueKey, snapRotateValue); // Remember we're doing the updates updateWindow = this; // Normally you'd remove the window, however we don't // as we want the snapping to continue when this window is closed //EditorApplication.update -= Update; }