コード例 #1
0
        public static AssetBundleManifest BuildAssetBundle(BuildTarget buildTarget)
        {
            TestResourcesEditorSettingsData settings = TestResourcesEditorSettings.Settings.GetData();
            AssetBundleBuildInfo            build    = GetAssetBundleBuildInfo(settings.AssetBundleName, settings.Folders);
            string outputPath = TestResourcesEditorSettings.GetAssetBundleOutputPath();

            Directory.CreateDirectory(outputPath);

            return(AssetBundleBuildUtility.Build(new[] { build }, outputPath, buildTarget, settings.AssetBundleOptions));
        }
        private void UpdateAssetBundleDrawer()
        {
            m_assetBundleDrawer.Clear();

            if (m_displayAssetBundleInfo)
            {
                string path = TestResourcesEditorSettings.GetAssetBundlePath();

                if (File.Exists(path))
                {
                    m_assetBundleDrawer.Set(path);
                }
            }
        }
コード例 #3
0
        public static void ClearAssetBundle()
        {
            string outputPath = TestResourcesEditorSettings.GetAssetBundleOutputPath();
            string metaPath   = $"{outputPath}.meta";

            if (Directory.Exists(outputPath))
            {
                Directory.Delete(outputPath, true);
            }

            if (File.Exists(metaPath))
            {
                File.Delete(metaPath);
            }
        }
コード例 #4
0
        public static bool IsAssetBundleExists()
        {
            string path = TestResourcesEditorSettings.GetAssetBundlePath();

            return(File.Exists(path));
        }