procedural mech in canvas UI
I have a prefab with a component that draws some procedural geometry, it has a regular Transform as I normally instantiate it into the directly into the scene.
But I want to also instantiate it into a canvas but since it has a regular Transform and not a RectTransform I can't get it to scale and position correctly.
I've tried creating a new prefab with a RectTransform and with the same procedural mesh component, but I can't figure out how to scale and position my mesh with relation to the rect transform, the produced mesh is tiny.
I also tried placing the object in a holder, I want to set the gameobject's local scale = holder size / mesh size but I'm not sure how to get the holder size.
I'm pretty new to unity and I have the feeling I'm miss understanding something in a fundamental way so I'm not even asking the right question...