- Home /
Need some help regarding UI layout in different Screen resolutions
Hi, I am creating a board game and want to create some spots for coins on that board. My board is just a image with some lines just like we have in Ludo Game, we can fit that image in all resolutions using "Canvas Scalar" Component but problem is how can we make spots of coin dynamic because we need their positions during game For example a spot is at (30 X, 40 Y) and in another resolution that spot will be at different position, in that case my coins will be disturbed Might be I'm doing in a wrong way, can you please help how to fix this problem?
Regards Jawad
Answer by xxmariofer · Apr 06, 2019 at 08:04 PM
Hello, pretty surr what you are looking for is vertical and horizontal layoyt group
https://docs.unity3d.com/Manual/script-HorizontalLayoutGroup.html
Thank you for this help! this give me some idea to proceed further, but I think this is helpful only in case of equal space between child elements. What if We need 3 elements in first row and 5 on second and so on? Can we skip child position in such layout?
well you could add "empty objects" whenever a space should be placed, its the only hack i can think of