Manipulate layer attributes and set the color correctly in Editor but not Windows Build

465
1
Jump to solution
03-01-2023 02:06 AM
dun82
by
New Contributor II

My project follows the 3DAttributeSample and rewrites the shader. Everyhing is fine when debugging in the editor window but once the project is built, errors below is found. 

ArgumentException: GCHandle value belongs to a different domain
at System.Runtime.InteropServices.GCHandle.op_Explicit (System.IntPtr value) [0x00020] in <75633565436c42f0a6426b33f0132ade>:0
at Esri.GameEngine.Attributes.ArcGISAttributeProcessorEventHandler.HandlerFunction (System.IntPtr userData, System.IntPtr layerAttributes, System.IntPtr visualizationAttributes) [0x0000e] in <662af139e46c429db3d72180a9332d24>:0
at (wrapper native-to-managed) Esri.GameEngine.Attributes.ArcGISAttributeProcessorEventHandler.HandlerFunction(intptr,intptr,intptr)

Appreciated if anyone can give me a hint. Thank you so much. 

0 Kudos
1 Solution

Accepted Solutions
dun82
by
New Contributor II

A quick follow-up to my own issue, it all about my careless mistake by declaring a local processor in the loop

var attributeProcessor = new Esri.GameEngine.Attributes.ArcGISAttributeProcessor();

where in the sample, attributeProcessor is a private global 

View solution in original post

0 Kudos
1 Reply
dun82
by
New Contributor II

A quick follow-up to my own issue, it all about my careless mistake by declaring a local processor in the loop

var attributeProcessor = new Esri.GameEngine.Attributes.ArcGISAttributeProcessor();

where in the sample, attributeProcessor is a private global 

0 Kudos