How can i summon enough objects to fit the screen

How can I summon enough objects to fit the screen?

For exp;

Only 8 objects should be visible in Phone 1
Only 20 objects should be visible in Tablet
Only 2 objects should be visible in Phone 2

Is the size of the blocks constant?

If yes then just divide the height of the device or the parent arrangement with the height of the block and same for width. Also do not forget to use the floor function if you do not want unfinished blocks

Yes ,

All objects are the same size, and the number of objects increases or decreases depending on the screen

1 Like

I gave the solution

@AtharvaPawar , can you explain this with blocks or aia file?
Thank you for your interest

You are creating the objects dynamically right?

Then there must be a loop too so for finding the max number of objects that can fit you need to divide the screen size(theres a block for finding the screen size) by the size of blocks that will give you a number that might be a decimal so to not fit any extra object on the screen use floor function (ex: if x =7.6 then floor(7.6) = 7). Now you will have a integer that you can put in the loop

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.