Beispiel #1
0
    public static void ShowPopup(string type, Func <string, bool> checkCall, Action <string, object> callback, object callbackArgs = null)
    {
        if (mWin == null)
        {
            var win = mWin = GetWindow <SavePrefabWindow>();
            win.maxSize = win.minSize = new Vector2(360, 120);
        }

        if (mWin)
        {
            mWin.mType         = type;
            mWin.mCheckCall    = checkCall;
            mWin.mCallback     = callback;
            mWin.mCallbackArgs = callbackArgs;

            mWin.titleContent = new GUIContent("请给" + type + "取个名字");

            mWin.mPrefabName = "";
            mWin.Show();
            mWin.Focus();
        }
    }
Beispiel #2
0
 private void PackageModule(object arg) => SavePrefabWindow.ShowPopup("模组", CheckNameAlreadyExist, SavePrefab, new object[] { HelperSettings.ModulePath, arg, "原子" });