Mixing Rect Transform and Transforms

Using 5.1.1…

I’ve got a World Space Canvas with some draggable UI panels + buttons as sub objects. They all have Rect Transforms as they normally would. I’ve also got a dynamically created/parented prefab which can be attached to one of the panels so they all drag as a group. The prefab has a normal Transform on it and contains a bunch of Cube Meshes/Colliders etc.

This works okay, and they all move together as they should, however, since I had to scale the world space canvas down to .01, the Transform component on the prefab comes in at 100 scale to appear normally.

This leads to headaches when I try and resize/move things later on.

So my question(s) are:

  1. What is the best practice for mixing parented UI + 3D objects which have to be scaled in order to appear correctly?

  2. Should I not be mixing Rect Transforms + Transforms and just convert everything to a Rect if it’s under a Canvas, regardless if it’s a UI element or not?

Bump as this was unfortunately my top search result 5 months later when I’m still wondering, now on 5.3.2 :smile:

@timothyallan

Hi, I’ve had no need to use such transform/RectTransform setup, but have tried this a couple of times. All I can say, you’ll lose anchoring on object that has just transform. However, based on limited experience with this I didn’t have any problems mixing them.