I'm working on isometric game in 2D but didn't find any good tutorial in how to handle animation...any help?
Update: There is now an animation package for DOTS which might work better than what is described in this answer, but is still considered highly experimental.
As far as I am aware, the machinima animation system with its convenient visual state machines and animation timelines isn't ported to DOTS yet. So you will have to program your own. My approach would be as follows:
Create a new shared component
Animationwhich refrences the meshes used for all the different animation frames of an animated asset.
Create instances of that shared component - one for each asset you want to animate.
Assign those shared
Animationcomponent instances to any entities you want to animate.
Create a new system
AnimationSystemwhich queries all entities with
Unity.Rendering.RenderMeshand any components which are relevant for determining what frame to display (Maybe
Unity.Transforms.Rotationto determine the direction it faces? Maybe
Unity.Physics.MotionVelocityto determine if it's running or standing? Maybe a component of your own which handles the current state of your entity?).
Implement the system to use the data from the components to determine which frame to display, retrieve the mesh for that frame from the
Animationcomponent and apply it to the
RenderMesh.meshof the entity.