Exemple #1
0
        public static void Init(string message)
        {
            ShowPopup window = ScriptableObject.CreateInstance <ShowPopup>();

            window.position = new Rect(Screen.width / 2, Screen.height / 2, 250, 150);
            window.Show();
            //window.ShowNotification(new GUIContent(message));
            //window.ShowPopup();
            window.message = message;
        }
Exemple #2
0
 static void OnSceneLoading(string path, OpenSceneMode mode)
 {
     Debug.Log("OnSceneLoading " + path + " " + mode);
     if (!FileModifiedChecker.CanEditFile(path))
     {
         string message = "ERROR can't edit file " + path + " since it's currently not editable and might be locked. Further edits might be lost";
         Debug.LogError(message);
         ShowPopup.Init(message);
     }
 }
Exemple #3
0
        public static string[] OnWillSaveAssets(string[] paths)
        {
            List <string> tmp = new List <string>();

            foreach (var path in paths)
            {
                if (CanEditFile(path))
                {
                    tmp.Add(path);
                }
                else
                {
                    string message = "file " + path + "can't be saved since it's read only, please unlock it to edit it";
                    Debug.LogError(message);
                    ShowPopup.Init(message);
                }
            }
            return(tmp.ToArray());
        }