Beispiel #1
0
        private void Import(string assetLibrary, bool isBuiltIn)
        {
            Transform transform = m_windowManager.CreateWindow(RuntimeWindowType.ImportAssets.ToString());
            AssetLibraryImportDialog assetLibraryImporter = transform.GetComponentInChildren <AssetLibraryImportDialog>();

            assetLibraryImporter.SelectedLibrary = assetLibrary;
            assetLibraryImporter.IsBuiltIn       = isBuiltIn;
        }
Beispiel #2
0
        private void Import(string assetLibrary)
        {
            AssetLibraryImportDialog assetLibraryImporter = Instantiate(m_assetLibraryImportPrefab);

            assetLibraryImporter.transform.position   = Vector3.zero;
            assetLibraryImporter.SelectedAssetLibrary = assetLibrary;

            PopupWindow.Show("Select Assets", assetLibraryImporter.transform, "Import",
                             args =>
            {
            },
                             "Cancel");
        }
        private void Import(string assetLibrary)
        {
            AssetLibraryImportDialog assetLibraryImporter = Instantiate(m_assetLibraryImportPrefab);

            assetLibraryImporter.transform.position   = Vector3.zero;
            assetLibraryImporter.SelectedAssetLibrary = assetLibrary;

            PopupWindow.Show("Select Assets", assetLibraryImporter.transform, "Import",
                             args =>
            {
                Editor.IsBusy = true;
                m_project.ImportAssets(assetLibraryImporter.SelectedAssets, error =>
                {
                    Editor.IsBusy = false;
                    if (error.HasError)
                    {
                        PopupWindow.Show("Unable to Import assets", error.ErrorText, "OK");
                    }
                });
            },
                             "Cancel");
        }
Beispiel #4
0
        private void Import(string assetLibrary, bool isBuiltIn)
        {
            AssetLibraryImportDialog assetLibraryImporter = Instantiate(m_assetLibraryImportPrefab);

            assetLibraryImporter.transform.position = Vector3.zero;
            assetLibraryImporter.SelectedLibrary    = assetLibrary;
            assetLibraryImporter.IsBuiltIn          = isBuiltIn;

            PopupWindow.Show("Select Assets", assetLibraryImporter.transform, "Import",
                             args =>
            {
                Editor.IsBusy = true;
                m_project.Import(assetLibraryImporter.SelectedAssets);
            },
                             "Cancel",
                             args =>
            {
                if (assetLibraryImporter.AssetLibraryRoot != null)
                {
                    m_project.UnloadImportItems(assetLibraryImporter.AssetLibraryRoot);
                }
            });
        }