First of all, it’s great to get the new Entities update.
Well, I have lodged myself into huge confusion with this Hybrid conversion workflow.
I want to clearly understand how a gameobject with Mecanim animator & skinnedmesh is setup for conversion.
Say you have a standard SkinnedMesh hierarchy in Unity:
Conversion (what to convert)
What part of this hierarchy is converted to entitiy world? Complete or Partial?
Do I put “Convert to entity” on any of these? If yes, on which gameobject?
Do I put “Convert to entity & inject gameobject” on any of these? If yes, on which gameobject?
Do I need to write an Authoring mono for proper conversion?
After Conversion or During Authoring
Should I use AddComponentObject() or a class IComponentData for attaching Animator to Entity?
Things I have noticed,
Just putting this gameobject straight into the subscene with proper URP shader with Compute Deformation/Linear Blend Skinning node leads to conversion of SkinnedMeshRenderer as per Hybrid renderer package, but it renders it incompatible with Mecanim Animator(correct me if I am wrong).
Please someone explain me, what is your standard workflow for converting a SkinnedMesh gameobject hierarchy so that you keep using Mecanim animator, everything else is in DOTS world, like Physics etc.
Physics is not from Convert, It Create new Physics in Entity world. So maybe we need to Wait Unity DOTS team to add this function, or anyone do this for us
DOTS Physics provides you out of the box authoring components like PhysicsShapeAuthoring and PhysicsBodyAuthoring, which will handle the conversion to relevant Physics components like PhysicsVelocity etc.
The question here is, how are people handling a Gameobject hierarchy with an Animator and SkinnedMeshRenderer, for specifically working with Mecanim in ECS.
Partial entity conversion seems the way, as SkinnedMesh representation of Hybrid renderer won’t work with Mecanim.
As Mecanim is now the animation solution for even DOTS 1.0, a standard conversion workflow for working with Mecanim in ECS will surely help a lot.
True, if I remember correctly, SkinnedMeshRenderer is broken into 2 separate entities after conversion by Hybrid Renderer. And Animator is lost in conversion.
Im just really confused about what Animation Team did last whole year,maybe provide a preview version,and now totally obstacled and force to use Mecanim
Most likely little to nothing was worked on animation for DOTS, as there is upcommg many changes to dots. They may come back to it after release 1.0. But not before, as they noted.
In our project, we use custom shader, which maps UV and bones IDs. This way bones are processed in DOTS then calculated rotation matrixes are passed into a shader.
It explains how I handled the Entities + GameObject with the Animator component for rendering + animation for now in my scenario. The idea is to have an implementation that render correctly for now without the performance gain for the animations for now, so I can still playtest the game until ECS have it’s real animation implemented.
If you have a better solution that would support the keeping the rendering in ECS while using the animator, I would be glad to hear it.