/// <summary> /// /// </summary> public override IAccessPoint Get(RuntimePlatform platform) { if (platform != RuntimePlatform.Android) { var storage = m_storage.Get(platform); return(new AccessPoint("file://" + storage.BasePath)); } return(m_storage.Get(platform)); }
public ManifestVersion Build(RuntimePlatform platform, BuildTarget buildTarget) { var rootUri = new Uri(System.Environment.CurrentDirectory + "/"); var buildMapUriList = new Uri[m_buildMapList.Length]; for (var i = 0; i < m_buildMapList.Length; i++) { var buildMapPath = m_buildMapList[i]; var file = buildMapPath.Get(platform); buildMapUriList[i] = new Uri(file.FullPath); } var bundleName = m_manifestName.Get(platform); var assets = buildMapUriList.Select(c => rootUri.MakeRelativeUri(c).ToString()).ToArray(); var address = assets.Select(c => Path.GetFileName(c)).ToArray(); var bundleBuild = new AssetBundleBuild { assetBundleVariant = string.Empty, assetNames = assets, addressableNames = address, assetBundleName = bundleName }; var outputPath = m_outputPath.Get(platform).BasePath; var m = BuildPipeline.BuildAssetBundles ( outputPath: outputPath, assetBundleOptions: BuildAssetBundleOptions.StrictMode, targetPlatform: buildTarget, builds: new[] { bundleBuild } ); return(new ManifestVersion { Hash = m.GetAssetBundleHash(bundleName), }); }
//========================================= // Method //========================================= /// <summary> /// ビルド /// </summary> public virtual ABBuildResult Build( RuntimePlatform platform, BuildTarget target, IBundleBuildConfig settings, IList <IBundleFileManifest> assetBundleList ) { var outputPath = m_outputPath.Get(platform); if (!Directory.Exists(outputPath.BasePath)) { Directory.CreateDirectory(outputPath.BasePath); } var option = settings.Options; var bundleList = assetBundleList .Select(d => d.ToBuildEntry()) .ToArray(); using (var scope = new CalcProcessTimerScope(this.GetType().Name)) { return(DoBuild(platform, target, option, bundleList)); } }
public IAccessPoint GetSaveStorage(RuntimePlatform platform) { return(m_downloadStorage.Get(platform)); }
public override IAccessPoint Get(RuntimePlatform platform) { return(m_parent.Get(platform).ToAppend(m_dirName)); }
//================================ // 関数 //================================ public IAccessLocation Get(RuntimePlatform platform) { return(m_storagePath.Get(platform).ToLocation(m_buildMapName.Identifier + m_extensions)); }