Hi,
I have a background sprite that i want to be stretched to fill the screen and I can't't seem to get it to function properly from a prefab (if in the editor it will adjust to the proper size after hitting ctrl+s twice)
Game Resolution : 800 x 480
UIRoot : Fixed Size - 720
Hierarchy:
UIRoot
-Camera
--Levels Container
---Level (Clone) (UIPanel, no anchoring)
----Background Sprite (UISprite, Unified Anchor (0,0,0,0) Target: Level (Clone))
Background Original Dimensions : 1024 x 576
Background In Game Dimensions : 800 x 480 (whatever the game resolution is)
I'm using Screen.width * UIRoot.GetPixelSizeAdjustment to calculate where to instantiate my level so it can slide in and that reports the correct dimensions (in this case 1080 x 720).
Included in the level prefab are a few sprites with colliders and auto-adjust collider set, the colliders get made very tiny when the prefab is instantiated, if I click off and on the auto-adjust checkbox it sets it to the right size.
I assume these issues are related.
Also I have a few elements that are anchored but also need to be dragged around, I used to just tell the UIAnchor to run once and that worked fine, now that option is not available (or at least I can't find the equivalent).
How do I go about these issues ?
Thanks.