コード例 #1
0
ファイル: autoSnap.cs プロジェクト: Code-Rooster/IB-Boss
    static void Init()
    {
        // Debug.Log("AutoSnap: Init");

        autoSnap window = (autoSnap)EditorWindow.GetWindow(typeof(autoSnap));

        window.maxSize = new Vector2(200, 125);
        window.Show();
    }
コード例 #2
0
ファイル: autoSnap.cs プロジェクト: Code-Rooster/IB-Boss
    public void OnDisable()
    {
        Debug.Log("AutoSnap: 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;
    }