Topic Author
Posts: 1
Joined: 30 Nov 2020, 09:16

VisualTreeHelper thread safety

22 Jan 2021, 15:44

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?

User avatar
Site Admin
Posts: 2254
Joined: 22 Dec 2011, 19:20

Re: VisualTreeHelper thread safety

26 Jan 2021, 11:34

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.

Who is online

Users browsing this forum: Bing [Bot], yuyoyuppe and 1 guest