I know DOTS is still experimental, but are there any examples out there on how to use the new inputsystem with DOTS/ECS?
Hi,
Here is how I do it for now :
- create a monobehavior implementing IConvertGameObjectToEntity
- create an “input forwarder” monobehavior
- grab a reference to the player entity during the convertion process (1.) and set it to the input forwarder (2.)
- in the input forwarder create a method taht read the user input and set a player input IComponentData on the player entity (3.)
- set it up in scene with a convert and inject for the gameobject that has the 2 monobehavior described above.
the official repo has an example https://github.com/Unity-Technologies/EntityComponentSystemSamples/blob/d616c1b077c306e6f31b41a3970799e4b132139b/UnityPhysicsSamples/Assets/Common/Scripts/DemoInputGatheringSystem.cs
1 Like
seems to not work on linux ubuntu 20