Closed canadaduane closed 4 years ago
Yep Hecs also runs on the server!
The active
field controls whether the system's update
is called each frame. You can also change this on your own systems at runtime if needed.
For the LookAtSystem
there's no point in it running because each client has everything it needs to update the rotation to look at another entity. Other systems like the RenderSystem, ShapeSystem, ModelSystem are all disabled on the server as they don't need to render or build meshes :)
The order
field controls the order that systems run. Since plugins aren't aware of other plugin systems (and your own systems) we use some common enums to stamp where a system should run. You can also do things like order = Groups.Initialization - 10
to do "pre-initialization" etc. Unity DOTS works the same way: https://docs.unity3d.com/Packages/com.unity.entities@0.0/manual/system_update_order.html
Cool, thank you. Closing since this answers my questions.
I see these properties in the
LookAtSystem
:This looks interesting!
Does this imply HECS can work on both client and server? Does setting
active = IS_BROWSER
make the system inactive on the server?What does setting the order of a System do? (What happens "at initialization" in the case of
LookAtSystem
?)