Is the Movement pack incompatible with BD 1.6.3 using Async loading?[SOLVED]


New member
Using the newest Movement Pack 1.5.5 with the newest BD 1.6.3 in a fresh project errors are thrown on tree's using the CanSeeObject task from the movement pack-

Seems its using code that isn't thread safe- error capture here-

Happens with the WithinDistance task as well as it uses NameToLayer-

Is just as simple a fix as replacing nameToLayer with a thread safe function that does the same? Going to try to fix it for my project-


New member
I got rid of the errors by removing the "NameToLayer" code so for example on CanSee the IgnoreLayerMask line looks like this-

public LayerMask ignoreLayerMask;

Seems to work fine-

Also on CanSee I had to move this line into OnStart()

ignoreRaycastLayer = LayerMask.NameToLayer("Ignore Raycast");

Wrote a small article with example to help anyone else who wants to use Async + Movement Pack now
BTree + Async + Movement Pack
Last edited:


Staff member
One of the downsides of aync load is that the Unity API is incompatible with calls from the non-main thread. In this case you moving the NameToLayer initialization is correct. Instead of moving to OnStart though I would move it to OnReset. This way you can still change the values. I'll do the same for the next version.