void DoToolbar(Rect rect)
        {
            GUILayout.BeginArea(rect);

            using (new EditorGUILayout.HorizontalScope())
            {
                var style = "miniButton";
                if (GUILayout.Button("Save Manifest", style))
                {
                    TenjinPackager.SaveManifestFile(SelectedAssets());
                }

                if (GUILayout.Button("Publish Unitypackage", style))
                {
                    TenjinPackager.PublishPackage(SelectedAssets());
                }

                GUILayout.FlexibleSpace();

                var label = $"{m_SimpleTreeView.SelectedItemCount()} files in package";
                GUILayout.Label(label);
            }

            GUILayout.EndArea();
        }
        protected override TreeViewItem BuildRoot()
        {
            var selectedAssets = TenjinPackager.LoadManifest();
            var assets         = AssetDatabase.FindAssets(null, new[] { "Assets" }).Select(x => AssetDatabase.GUIDToAssetPath(x));
            var root           = new TenjinAssetViewItem {
                selected = false, id = 0, depth = -1, displayName = "Root"
            };

            var allItems = assets.Select((a, index) =>
            {
                return(new TenjinAssetViewItem
                {
                    selected = selectedAssets.Contains(a),
                    id = index,
                    depth = DepthFromPath(a),
                    displayName = a
                } as TreeViewItem);
            }).ToList();

            SetupParentsAndChildrenFromDepths(root, allItems);

            return(root);
        }
Exemplo n.º 3
0
        internal static void PackageInteractively()
        {
            var files = TenjinPackager.LoadManifest();

            TenjinPackager.PublishPackage(files, TenjinPackager.EXPORTED_PACKAGE_PATH, true);
        }
Exemplo n.º 4
0
        static void Package()
        {
            var files = TenjinPackager.LoadManifest();

            TenjinPackager.PublishPackage(files);
        }