ncsoft / Unreal.js

Unreal.js: Javascript runtime built for UnrealEngine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Race condition?

srfoster opened this issue · comments

My repro: On the latest version of Unreal.js, I'm evaluating the following many times per second (as quickly as I can send messages into Unreal via a tcp server):

GWorld.GetAllActorsOfClass(Actor).OutActors

It almost always returns a non-empty list. But occasionally it is empty.

What would cause Unreal.js to briefly think there are no actors in the game? (There are actors in the game, btw.)

If I recall correctly the V8 instance runs on the game thread so it shouldn't be a race condition. It may be a timing/context of when the function is called?