Unity-AltSourceGenerator
Unity-AltSourceGenerator copied to clipboard
System.Runtime.CompilerServices.IsExternalInit is not defined or imported
Hey! Thanks for the project! I'm getting this error as soon as I import it:
Library\PackageCache\com.sator-imaging.alt-source-generator@4fcd4088cd\Runtime\USGContext.cs(8,40): error CS0518: Predefined type 'System.Runtime.CompilerServices.IsExternalInit' is not defined or imported
I was able to fix this by importing your package as a custom package and adding the following class to it:
#if NETSTANDARD2_0 || NETSTANDARD2_1 || NETCOREAPP2_0 || NETCOREAPP2_1 || NETCOREAPP2_2 || NETCOREAPP3_0 || NETCOREAPP3_1 || NET45 || NET451 || NET452 || NET6 || NET461 || NET462 || NET47 || NET471 || NET472 || NET48
using System.ComponentModel;
namespace System.Runtime.CompilerServices
{
[EditorBrowsable(EditorBrowsableState.Never)]
internal static class IsExternalInit { }
}
#endif