Prefabs loading with wrong size on iOS device (but not in Unity test runs)

Discussion and help for Easy Save 3
Post Reply
Canley
Posts: 14
Joined: Tue Nov 08, 2022 11:22 am

Prefabs loading with wrong size on iOS device (but not in Unity test runs)

Post by Canley »

Heya,

So I uploaded a beta build to TestFlight for my app, using ES3 to save and load a dictionary of prefab'd game objects.

The objects look ok when first instantiated. They load into a scroll panel under a permanent parent object as desired.

On closing and reloading the app, the loaded prefabs carry the correct data, but have lost the size details and appear much too large.

Test device has a different screen size from the native size used in unity editor.

Perhaps there are layout settings that aren't loading from file with the prefabs?

I've replicated in the unity editor by instantiating objects with one screen size, then stopping, changing the screen size, and restarting. The objects are now the wrong size.

Is this issue familiar to anyone?

Showing correctly:
Screen Shot 2022-11-10 at 12.24.07 pm.png
Screen Shot 2022-11-10 at 12.24.07 pm.png (179.97 KiB) Viewed 895 times
Wrong size on reload with different screen size:
Screen Shot 2022-11-10 at 12.26.11 pm.png
Screen Shot 2022-11-10 at 12.26.11 pm.png (191.01 KiB) Viewed 895 times
Thanks heaps :)
Canley
Canley
Posts: 14
Joined: Tue Nov 08, 2022 11:22 am

Re: Prefabs loading with wrong size on iOS device (but not in Unity test runs)

Post by Canley »

Ok my current workaround for this is to load the prefab objects' scale from their (permanent) parent. That's working. But it would be great to avoid that need if possible.
User avatar
Joel
Moodkie Staff
Posts: 4852
Joined: Wed Nov 07, 2012 10:32 pm

Re: Prefabs loading with wrong size on iOS device (but not in Unity test runs)

Post by Joel »

Hi Canley,

I’ve never heard of this issue before. Please could you replicate it in a new project with a simple scene and private message it to me with instructions so that I can see what is happening?

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Canley
Posts: 14
Joined: Tue Nov 08, 2022 11:22 am

Re: Prefabs loading with wrong size on iOS device (but not in Unity test runs)

Post by Canley »

Thanks Joel, will do.

Could be related to the prefabs being part of a scroll panel? Or some weird error on my part.
Post Reply