Closed FernandoMonroy closed 5 years ago
From the look of your stack trace it appears that your problem is actually inside Unity, not in the promise library. Since promises have no concept of threading inherintly but are just a useful tool that can be used for managing tasks across threads, you still need to keep track of what threads you're using promises from yourself.
If you aren't already using this, the dispatcher pattern can be quite useful when managing tasks that run on different threads, and it fits nicely with promises. Unity also has limitations on which threads can access certain data so make sure that you aren't calling any Unity functions off the main thread that it doesn't support. One solution to this is to cache the data you need on the main thread and then pass that to the dispatch thread that will do the actual processing on it.
I got the following issue. It's not presented always, but y appears randomly and stops the execution of the program.
For now it has been show on Editor, multiple times.
get_name can only be called from the main thread. Constructors and field initializers will be executed from the loading thread when loading a scene. Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function. UnityEngine.Object:get_name() BootstrapStageLogger:Logger(String, AnalyticsDataStage) (at Assets/_CommonFMM/Scripts/Bootstrap/BootstrapStage.cs:17)