Open LamPham opened 5 years ago
Workaround below, have to translate the text.
https://notargs.hateblo.jp/entry/ecs_unirx
Just init this bootstrap script before your ECS scripts.
using UnityEngine;
using Unity.Entities;
public class Bootstrap : MonoBehaviour
{
void Start()
{
var playerLoop = ScriptBehaviourUpdateOrder.CurrentPlayerLoop;
UniRx.Async.PlayerLoopHelper.Initialize(ref playerLoop);
}
}
ScriptBehaviourUpdateOrder.CurrentPlayerLoop has been removed from the API. Is there still a way to do this properly?
I've been working on an ECS (Entity Component System) setup for my game and integrating UniRx immediately prevents OnUpdate for all Systems.
I am not quite sure what could cause this but it may involve the experimental PlayerLoopSystem clashing with ECS.
Testing on: Unity 2019.1.0f2 Packages: Entities: preview.30 - 0.0.0.12 Hybrid Renderer: preview.10 - 0.0.1
We can quickly reproduce this with Unity's Sample ECS project. Unity ECS Samples
First run any sample (we tested with "HelloCube_01_ForEach") without UniRx and access the Entities Debugger (Window > Analysis > Entity Debugger) and notice that the world is displayed with active Systems and their execution times.
Add in UniRx to the project. It will deactivate all Systems (everything is grayed out) when played.
Thank you in advance,