FlowCanvas Forums › Support › [Bug v3.2.1] Nodes Menu fails to populate on reflection nodes › Reply To: [Bug v3.2.1] Nodes Menu fails to populate on reflection nodes
When wrapping the RTGetAttribute() method into a try/catch, this is the exception I get:
Message:
GetPackageByAssetPath 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.Stack:
at (wrapper managed-to-native) UnityEditor.PackageManager.PackageInfo.GetPackageByAssetPath(string)
at UnityEditor.PackageManager.PackageInfo.FindForAssetPath (System.String assetPath) [0x0001b] in <12f9706bdb064a6c8a1d1b6f565a0097>:0
at UnityEditor.PackageManager.PackageInfo.FindForAssembly (System.Reflection.Assembly assembly) [0x00032] in <12f9706bdb064a6c8a1d1b6f565a0097>:0
at UnityEngine.Rendering.DocumentationInfo.get_version () [0x00000] in C:\Users\leona\Documents\Projects\FlowCanvasTest2021\Library\PackageCache\com.unity.render-pipelines.core@12.1.0\Runtime\Documentation.cs:52
at UnityEngine.Rendering.DocumentationInfo.GetPageLink (System.String packageName, System.String pageName) [0x00000] in C:\Users\leona\Documents\Projects\FlowCanvasTest2021\Library\PackageCache\com.unity.render-pipelines.core@12.1.0\Runtime\Documentation.cs:66
at UnityEngine.Rendering.CoreRPHelpURLAttribute..ctor (System.String pageName, System.String packageName) [0x00000] in C:\Users\leona\Documents\Projects\FlowCanvasTest2021\Library\PackageCache\com.unity.render-pipelines.core@12.1.0\Runtime\Documentation.cs:30
at UnityEngine.Rendering.HighDefinition.HDRPHelpURLAttribute..ctor (System.String pageName) [0x00000] in C:\Users\leona\Documents\Projects\FlowCanvasTest2021\Library\PackageCache\com.unity.render-pipelines.high-definition@12.1.0\Runtime\Documentation.cs:9
at (wrapper managed-to-native) System.MonoCustomAttrs.GetCustomAttributesInternal(System.Reflection.ICustomAttributeProvider,System.Type,bool)
at System.MonoCustomAttrs.GetCustomAttributesBase (System.Reflection.ICustomAttributeProvider obj, System.Type attributeType, System.Boolean inheritedOnly) [0x00013] in <7b5f9a2f7db343a4ab54846ed680277b>:0
at System.MonoCustomAttrs.GetCustomAttributes (System.Reflection.ICustomAttributeProvider obj, System.Type attributeType, System.Boolean inherit) [0x00037] in <7b5f9a2f7db343a4ab54846ed680277b>:0
at System.RuntimeType.GetCustomAttributes (System.Boolean inherit) [0x00000] in <7b5f9a2f7db343a4ab54846ed680277b>:0
at ParadoxNotion.ReflectionTools.RTGetAllAttributes (System.Type type) [0x0000f] in C:\Users\leona\Documents\Projects\FlowCanvasTest2021\Assets\ParadoxNotion\CanvasCore\Common\Runtime\ReflectionTools.cs:877
at ParadoxNotion.ReflectionTools.RTGetAttribute (System.Type type, System.Type attributeType, System.Boolean inherited) [0x00000] in C:\Users\leona\Documents\Projects\FlowCanvasTest2021\Assets\ParadoxNotion\CanvasCore\Common\Runtime\ReflectionTools.cs:894