Esempio n. 1
0
        void RecaptureSettings()
        {
            mySceneData    = SceneData.RecaptureSettings(true);
            theirSceneData = SceneData.RecaptureSettings(false);

            SceneData.Cleanup();
        }
Esempio n. 2
0
        void RecaptureSettings()
        {
            mySceneData = SceneData.RecaptureSettings(true);
            mySO        = new SerializedObject(mySceneData);

            theirSceneData = SceneData.RecaptureSettings(false);
            theirSO        = new SerializedObject(theirSceneData);

            SceneData.Cleanup();
        }
Esempio n. 3
0
        protected override void OnEnable()
        {
            draw = Draw;
            base.OnEnable();
            if (!merged)
            {
                SceneData.Cleanup();
            }

            //Get path
#if Unity3 //TODO: Unity 3 path stuff?
#else
            var scriptPath = AssetDatabase.GetAssetPath(MonoScript.FromScriptableObject(this));
            if (!string.IsNullOrEmpty(scriptPath))
            {
                UniMergeConfig.DefaultPath = scriptPath.Substring(0, scriptPath.IndexOf("Editor") - 1);
            }
#endif

            if (Directory.Exists(UniMergeConfig.DefaultPath + "/Demo/Scene Merge"))
            {
                var assets = Directory.GetFiles(UniMergeConfig.DefaultPath + "/Demo/Scene Merge");
                foreach (var asset in assets)
                {
                    if (asset.EndsWith(".unity"))
                    {
                        if (asset.Contains(MySceneName))
                        {
                            mine = AssetDatabase.LoadAssetAtPath(asset.Replace('\\', '/'), typeof(UnityObject));
                        }
                        if (asset.Contains(TheirSceneName))
                        {
                            theirs = AssetDatabase.LoadAssetAtPath(asset.Replace('\\', '/'), typeof(UnityObject));
                        }
                    }
                }
            }

            if (EditorPrefs.HasKey(RowHeightKey))
            {
                selectedRowHeight = EditorPrefs.GetInt(RowHeightKey);
            }

            loading = false;
        }
Esempio n. 4
0
        protected override void OnEnable()
        {
            minSize = new Vector2(700, 300);
            draw    = Draw;
            base.OnEnable();
            if (!merged)
            {
                SceneData.Cleanup();
            }

#if DEV
            SetupTestMerge();
#endif

            if (EditorPrefs.HasKey(RowHeightKey))
            {
                selectedRowHeight = EditorPrefs.GetInt(RowHeightKey);
            }

            loading = false;
        }