private async void BuildMod()
        {
            var scene = EditorSceneManager.GetActiveScene();

            EditorUtility.DisplayProgressBar("ModPlayerSDK", "Building...", 0);
            UniMigration.MigrateAll();

            AssetImporter.GetAtPath(scene.path)
            .SetAssetBundleNameAndVariant($"{modName}_scene", "");

            BundleResources.SetAssetBundleAllResources($"{modName}_script");

            MergeCsx.CreateMonolith(
                "Assets/modplayer_script.json",
                $"{modName}_script");

            UniAssetBundle.BuildUniScriptScene(
                $"{modName}_scene", $"{modName}_script");

            UniMigration.EndMigration();

            EditorUtility.DisplayProgressBar("ModPlayerSDK", "Uploading...", 0);
            await UploadMod();

            EditorUtility.ClearProgressBar();
        }
Exemple #2
0
 public static void BuildAssetBundle()
 {
     UniAssetBundle.BuildUniScriptScene("testbundle_scene", "testbundle_script");
 }