I have some ECS-related questions, not urgent but it seems like stuff I should know.
- Is there a way to invoke events from an ISystem? Stuff like actions ans delegates. I use the event system a lot and it seems that I will have to use a SystemBase system in order to do it
- How do you get a reference to an ISystem from a Monobehavior?
- Is there an ISystem or Job version of Tasks, Awaitables or IEnumerators where you can delay code execution until some condition is met?
- Does every ECS code have to be constrained within the OnCreate, OnUpdate, OnDestroy, OnStart/StopRunning functions? For example, in a monobehavior code, there are stuff like OnTriggerEnter/Stay/Exit events, but in ECS I always have to add flags to constrain the OnUpdate method from calling an ITriggerEvent every update call so that I can use a TriggerEnter/Exit-like logic as opposed to its default OnTriggerStay-like logic.
Of course there are “workarounds” to all of these, but given that I'm only barely a year into DOTS, I feel like there are some tricks I don't know about and they would really come in very handy.