Unity 2020.1.6f1/MM 2.0.8
I have a setup where I have main graph having a Biome Set, two biomes there and inside these biomes, I have some functions. Everything works until I check Override Exposed in any of those functions. This issue only happens when I have the Function inside a Biome. If I use the biome graph directly, everything works fine.
Happens 100% of times in playmode and only sometimes in edit mode
I'm sending you an email with 3 simple graphs to reproduce this.
This is the stack trace I got:
Thread failed: UnityEngine.UnityException: CreateScriptableObjectInstanceFromType can only be called from the main thread.
Constructors and field initializers will be executed from the loading thread when loading a scene.
Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.
at (wrapper managed-to-native) UnityEngine.ScriptableObject.CreateScriptableObjectInstanceFromType(System.Type,bool)
at UnityEngine.ScriptableObject.CreateInstance (System.Type type) [0x00001] in :0
at UnityEngine.ScriptableObject.CreateInstance[T] () [0x00001] in :0
at MapMagic.Nodes.Graph.Create (MapMagic.Nodes.Graph src, System.Boolean inThread) [0x0001a] in C:\Dev\Unity\project\Assets\3rdParty\MapMagic\Nodes\Graph.cs:43
at MapMagic.Nodes.Biomes.Function200.GetSubGraph (MapMagic.Products.TileData parentData) [0x0002d] in C:\Dev\Unity\project\Assets\3rdParty\MapMagic\Generators\Biomes\Runtime\Function.cs:129
at MapMagic.Nodes.Biomes.Function200.Generate (MapMagic.Products.TileData data, MapMagic.Products.StopToken stop) [0x00023] in C:\Dev\Unity\project\Assets\3rdParty\MapMagic\Generators\Biomes\Runtime\Function.cs:185
at MapMagic.Nodes.Graph.GenerateRecursive (MapMagic.Nodes.Generator gen, MapMagic.Products.TileData data, MapMagic.Products.StopToken stop) [0x00149] in C:\Dev\Unity\project\Assets\3rdParty\MapMagic\Nodes\Graph.cs:778
at MapMagic.Nodes.Graph.GenerateRecursive (MapMagic.Nodes.Generator gen, MapMagic.Products.TileData data, MapMagic.Products.StopToken stop) [0x00035] in C:\Dev\Unity\project\Assets\3rdParty\MapMagic\Nodes\Graph.cs:750
at MapMagic.Nodes.Graph.Generate (MapMagic.Products.TileData data, MapMagic.Products.StopToken stop) [0x00039] in C:\Dev\Unity\project\Assets\3rdParty\MapMagic\Nodes\Graph.cs:732
at MapMagic.Nodes.Graph.Generate (MapMagic.Products.TileData data, MapMagic.Products.Stop