Esempio n. 1
0
        public static void OpenBundle(OSCMapBundle bundle)
        {
            ShowWindow();

            Instance.Focus();
            Instance.rootPanel.CurrentMapBundle = bundle;
        }
Esempio n. 2
0
        private void OpenMapBundle(object userData, string[] options, int selected)
        {
            SaveCurrentMapBundle();

            var patches = (string[])userData;

            _currentMapBundle = AssetDatabase.LoadAssetAtPath <OSCMapBundle>(patches[selected]);
        }
Esempio n. 3
0
        private void CreateMapBundle()
        {
            var assetPath = EditorUtility.SaveFilePanelInProject("Create Map Bundle", "New Map Bundle", "asset", "Save map bundle as...");

            if (!string.IsNullOrEmpty(assetPath))
            {
                SaveCurrentMapBundle();

                var mapBundle = ScriptableObject.CreateInstance <OSCMapBundle>();

                AssetDatabase.CreateAsset(mapBundle, assetPath);
                AssetDatabase.SaveAssets();

                _currentMapBundle = mapBundle;

                Selection.activeObject = mapBundle;
            }
        }
Esempio n. 4
0
        public static void OpenBundle(OSCMapBundle bundle)
        {
            Open();

            Instance.rootPanel.CurrentMapBundle = bundle;
        }
 protected void OnEnable()
 {
     _bundle = target as OSCMapBundle;
 }