TGViewer
Everyday Unity Everyday Unity @everydayunity · 1.18K subscribers
Post #2463 1.01K
Unity’s TransformAccessArray — Internals and Best Practices

The TransformAccessArray in Unity is a specialized structure used for efficiently managing and accessing multiple Transform components, particularly in the context of jobs. It is designed to work with the Job System to allow parallel processing of Transform operations while minimizing overhead.
I tested this in my pet project a long time ago, and the difference was very noticeable, almost eliminating the cost of moving a large number of transforms every frame. While the API is pretty clean, working with jobs still adds cognitive load, so my advice is to always profile your code. Only if you see that transforms are the bottleneck should you switch from simple transform manipulations to using TransformAccessArray.

Tips from the Article:
- Use Burst.
- When a job only needs to read transforms (i.e., not write), use IJobParallelForTransform.ScheduleReadOnly.
- Break deep transform hierarchies into multiple transform roots whenever possible. This tip was also mentioned at Unite 2018 and in my post summarizing all performance tips from Unite.
- Review the desiredJobCount and innerloopBatchCount parameters. Aim for small enough values to keep all workers busy, but large enough to minimize the overhead of workers grabbing or stealing tasks too frequently.
- Prefer local space transform data like localPosition and GetLocalPositionAndRotation over world space data like position and localToWorldMatrix when possible.
- Reuse TransformAccessArray instances between frames; avoid recreating them unnecessarily.
- To remove a transform from the array, use TransformAccessArray.RemoveAtSwapBack instead of recreating the array. This is a general best practice for removing elements in hot paths.
- Avoid using transforms in a TransformAccessArray to store intermediary data between jobs. Transform access in jobs is slower compared to other alternatives.

https://medium.com/toca-boca-tech-blog/unitys-transformaccessarray-internals-and-best-practices-2923546e0b41

#optimization #performance #transform
Medium Unity’s TransformAccessArray — internals and best practices Understand Unity’s TransformAccessArray in depth with examples, and learn performance best practices for transforms and the job system.
  • 🔥 10
  • 👍 2
More from @everydayunity
  1. Sep 24, 2026Now you can change the effort mid session in new Claude. So the advice about caching from…
  2. Sep 24, 2026We were wondering in the comments what Claude reset does. Here is the answer https://www.r…
  3. Sep 22, 2026Introducing GPT‑6 Sol and Luna And better & cheaper sol and luna as an immediate response…
  4. Sep 22, 2026Introducing Claude Opus 5.5 \ Anthropic Cost and speed. Opus 5.5 requires less compute to…
  5. Sep 21, 2026Claude Code effort level and model selection effort means more than just "thinking time."…
  6. Sep 19, 2026Netcode for GameObjects 3.0.0 is now available It is preparation for Unity’s shared Netcod…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →