示例#1
0
        public static void OpenBundle(OSCMapBundle bundle)
        {
            ShowWindow();

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

            var patches = (string[])userData;

            _currentMapBundle = AssetDatabase.LoadAssetAtPath <OSCMapBundle>(patches[selected]);
        }
示例#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;
            }
        }
示例#4
0
        public static void OpenBundle(OSCMapBundle bundle)
        {
            Open();

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