Page 1 of 1

VisualTreeHelper thread safety

Posted: 22 Jan 2021, 15:44
by isverdlin_WE
there is c# project in unity3d i try to make some automation of.

is VisualTreeHelper should be threadsafe to use?
or should i use it only from unity's main(update) thread/render thread?

right now there is native dll crashes sometimes from Noesis.VisualTreeHelper:GetDescendantBounds when ui changes midair when called from net worker thread, so i wonder if i shoud report it of there is some threadsafety guidelines i missed?

Re: VisualTreeHelper thread safety

Posted: 26 Jan 2021, 11:34
by sfernandez
Any interaction with the visual tree should be done in Unity's main thread, were the view and its elements were created.
But we should add access verification to those methods to provide a correct message instead of silently crashing, will do that for the next release.