public AndroidGameStructure(FileCollection collection, string rootPath) : this(collection, rootPath, string.Empty) { }
public void Export(string exportPath, Func <Object, bool> filter) { FileCollection.Exporter.Export(exportPath, FileCollection, FileCollection.FetchAssets().Where(t => filter(t))); }
public GameStructure() { FileCollection = new FileCollection(OnRequestDependency, OnRequestAssembly); m_mixedStructure = new MixedGameStructure(FileCollection); }
public MixedGameStructure(FileCollection collection) : base(collection) { }
public void ReadWebFile(FileCollection collection) { m_stream.Position = m_offset; collection.ReadWebFile(m_stream, FilePath); }
public void ReadSerializedFile(FileCollection collection, Action <string> dependencyCallback) { m_stream.Position = m_offset; collection.ReadSerializedFile(m_stream, FilePath, Name, dependencyCallback); }
public Program() { m_collection = new FileCollection(); m_collection.EventRequestDependency += OnRequestDependency; }
public static IEnumerable <Object> FetchExportObjects(FileCollection collection) { //yield break; return(collection.FetchAssets()); }
public WebGLStructure(FileCollection collection, string rootPath) : base(collection) { if (string.IsNullOrEmpty(rootPath)) { throw new ArgumentNullException(rootPath); } m_root = new DirectoryInfo(DirectoryUtils.ToLongPath(rootPath)); if (!m_root.Exists) { throw new Exception($"Directory '{rootPath}' doesn't exist"); } Dictionary <string, string> files = new Dictionary <string, string>(); string buildPath = Path.Combine(m_root.FullName, BuildName); if (Directory.Exists(buildPath)) { DirectoryInfo buildDirectory = new DirectoryInfo(buildPath); foreach (FileInfo file in buildDirectory.EnumerateFiles()) { if (file.Name.EndsWith(DataWebExtension, StringComparison.Ordinal)) { Name = file.Name.Substring(0, file.Name.Length - DataWebExtension.Length); files.Add(Name, file.FullName); break; } } DataPathes = new string[] { rootPath, buildPath }; } else { string developmentPath = Path.Combine(m_root.FullName, DevelopmentName); if (Directory.Exists(developmentPath)) { DirectoryInfo buildDirectory = new DirectoryInfo(developmentPath); foreach (FileInfo file in buildDirectory.EnumerateFiles()) { if (file.Extension == DataExtension) { Name = file.Name.Substring(0, file.Name.Length - DataExtension.Length); files.Add(Name, file.FullName); break; } } DataPathes = new string[] { rootPath, developmentPath }; } else { string releasePath = Path.Combine(m_root.FullName, ReleaseName); if (Directory.Exists(releasePath)) { DirectoryInfo buildDirectory = new DirectoryInfo(releasePath); foreach (FileInfo file in buildDirectory.EnumerateFiles()) { if (file.Extension == DataGzExtension) { Name = file.Name.Substring(0, file.Name.Length - DataGzExtension.Length); files.Add(Name, file.FullName); break; } } DataPathes = new string[] { rootPath, releasePath }; } else { throw new Exception("Build directory hasn't been found"); } } } if (files.Count == 0) { throw new Exception("No files has been found"); } CollectStreamingAssets(m_root, files); Files = files; Assemblies = new Dictionary <string, string>(); //m_fileCollection.AssemblyManager.ScriptingBackEnd = ScriptingBackEnd.Il2Cpp; }