- Home /
Dragging panel(prefab) from screen space canvas to world space canvas and scaling to fit
Ok so I've looked and can't find much on this, so hopefully someone can help me or suggest a different way to attain the same outcome.
I am making a card game of sorts were when you play a card it spawns a mob to fight on a 3d battle table. So I have the players hand UI on a screen space canvas and have attached a world space canvas to the spawning object (A tent) to place the card which is a prefab. But when I drag from the screen space canvas to the world space one the card is massive breaking the bounds of the card holder (world space canvas).
Nothing I do seems to work using layout grids set the size but the car just ignores it during runtime. I wrote a small script to try to scale the card when is placed but all the children of the card also scale oddly and the card becomes unreadable. Also when I drag it back to the UI canvas(screen space) it seems to scale on the x but the y remains huge intermittently.
It's probably something easy that I don't know about so any help or links to guides etc is appreciated. I thought I could use multiple canvases to make life easier with dragging cards around instead of spawning a new card int the 3D world.