I have a requirement to simulate the hierarchical relationship of transform in a thread. Finally, the gameobject will be generated in the ui thread based on the simulated data. In unity, Transform has localposition, localrotation, and localscale attributes. When setting parent to Transform, localposition, localrotation, and localscale will change accordingly. What is this change? My guess is to convert the local information of the current Transform into a matrix, and then use its original parent's localtoworldmatrix to act on the matrix to get its information in the world. Then use the new parent's worldtolocalmatrix to act on the world matrix to get the final matrix, from which localposition, localrotation and localscale are extracted. But currently I have implemented a Transform logic based on this idea. It is ok when there are only two layers in the parent-child hierarchy. After three layers, there is a big deviation from the one created with gameobject. This is my demo, what is the problem?