Search Unity

Bug "Failed to build AssetBundle: No constructor found for UnityEditor.Scripting.MonoIsland" Error

Discussion in 'Editor & General Support' started by turtle-bienhoa, Dec 12, 2022.

  1. turtle-bienhoa

    turtle-bienhoa

    Joined:
    Dec 9, 2022
    Posts:
    3
    I am trying to Build AssetBundle after tinkering with a game mod source code. However, this message shows up instead:

    Failed to build AssetBundle: No constructor found for UnityEditor.Scripting.MonoIsland::.ctor(UnityEditor.BuildTarget, System.String, System.String[], System.String[], System.String[], System.String)
    at System.Activator.CreateInstance (System.Type type, BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00134] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Activator.cs:319
    at System.Activator.CreateInstance (System.Type type, System.Object[] args, System.Object[] activationAttributes) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Activator.cs:268
    at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Activator.cs:263
    at AssetBundler.CompileAssemblyWithEditor () [0x001d6] in D:\KTANE Modules\ktanemod_twobits-master\Assets\Editor\Scripts\AssetBundler.cs:268
    at AssetBundler.BuildModBundle (Boolean useMSBuild) [0x000c9] in D:\KTANE Modules\ktanemod_twobits-master\Assets\Editor\Scripts\AssetBundler.cs:120
    UnityEngine.Debug:LogErrorFormat(String, Object[])
    AssetBundler:BuildModBundle(Boolean) (at Assets/Editor/Scripts/AssetBundler.cs:142)
    AssetBundler:BuildAllAssetBundles_WithEditorUtility() (at Assets/Editor/Scripts/AssetBundler.cs:70)

    After this, another error shows up:

    The compiler this script was imported with is not available anymore.
    UnityEditor.AssetDatabase:ImportAsset(String, ImportAssetOptions)
    AssetBundler:RestoreMonoScripts() (at Assets/Editor/Scripts/AssetBundler.cs:347)
    AssetBundler:BuildModBundle(Boolean) (at Assets/Editor/Scripts/AssetBundler.cs:147)
    AssetBundler:BuildAllAssetBundles_WithEditorUtility() (at Assets/Editor/Scripts/AssetBundler.cs:70)

    As I am new to Unity (and C#), I haven't get the gist of what it means. Can a more experienced programmer help me with this?

    Thank you.