Exemplo n.º 1
0
        private void AddRegistryObjectDependency(UTinyModule module)
        {
            if (null == module)
            {
                return;
            }

            foreach (var m in module.EnumerateDependencies())
            {
                var path = UTinyPersistence.GetLocation(m);

                // Core or sample module/project don't need to be packaged, they will be included from the manifest.
                if (ShouldPackage(path))
                {
                    AddFileElements(path, false);
                }

                foreach (var asset in AssetIterator.EnumerateAssets(m))
                {
                    if (ShouldPackage(asset.AssetPath))
                    {
                        AddFileElements(asset.AssetPath, false);
                    }
                }
            }
        }
Exemplo n.º 2
0
        private void AddRequiredFileAndFolders()
        {
            var project = UTinyEditorApplication.Project;

            if (null == project)
            {
                return;
            }
            AddFileElements(UTinyPersistence.GetLocation(project), false);
        }
        private static DirectoryInfo GetOrCreateContextDirectory(UTinyEditorContext context)
        {
            string directory;

            // [MP] @TODO: Get the actual folder where the project/solution is stored.
            if (context.ContextType == EditorContextType.Project)
            {
                directory = UTinyPersistence.GetLocation(context.Project);
            }
            else
            {
                directory = UTinyPersistence.GetLocation(context.Module);
            }

            return(Directory.CreateDirectory(Path.Combine(Path.GetDirectoryName(directory ?? "Assets/"), k_UTinyTempFolderName)));
        }
Exemplo n.º 4
0
        private void AddRegistryObjectDependency(UTinyProject project)
        {
            if (null == project)
            {
                return;
            }

            var path = UTinyPersistence.GetLocation(project);

            // Core or sample module/project don't need to be packaged, they will be included from the manifest.
            if (ShouldPackage(path))
            {
                AddFileElements(path, false);
            }

            foreach (var module in project.Module.Dereference(project.Registry).EnumerateDependencies())
            {
                AddRegistryObjectDependency(module);
            }
        }