Correct was to Translate in an IJobChunk, in 1.0?

Unity reworked how Transform data works in Entities 1.0. The old Position, Rotation, LocalScale Components have been removed and replaced by the new TransformAspect.

But using Aspects isn’t supported in IJobChunk jobs, so it’s unclear how Unity intends for users to manipulate an Entity’s transform from inside of an IJobChunk job.

Some people have figured out that they can add the source generated TransformAspect.TypeHandle to their jobs as a workaround, though this seems a bit like a user-discovered hack. The pattern doesn’t match how we’re meant to use any other Component types in IJobChunks, and it doesn’t work the same way for other Aspect types. It is possible for you to wait for Unity to generate the ‘TypeHandle’ member of your own custom Aspects, and then to use that in an IJobChunk, but that also feels like a bit of a user-discovered hack - an accidental byproduct of how Aspect generation needed to work, rather than an intended workflow.

I’m looking for some guidance from Unity devs about what the intended workflow is to Translate an Entity in an IJobChunk now. How did they plan that this should work, when they decided to change Transforms?

Thank you for any advice!

TransformAspect is just a sytax sugar wrapper, look at it’s internals and you’ll see what it’s using. If you want translate by yourself, just use LocalToWorldTransform : IComponentData directly in user friendly manner, which is exactly what responsible for translation rotation and scale now (and parent relations through LocalToParentTransform, ParentToWorldTransform if required). It contains UniformScaleTransform struct with position, uniform scale, rotation you can modify directly and bunch of handful methods.

Thank you - that’s exactly what I was looking for. Really appreciate it - my ability to dig into the 1.0 source code has been limited lately, and I really appreciate the help.