How To Setup a game for All Resolutions??? ( not the UI elements)…
I’m… not exactly sure what you’re asking here. What do you mean?
I have a colliders surrounding the main camera to restrict the play area . Resolution I used is 16 : 9 . But when i changed it to 4 : 3 the colliders are way too away for abvious reason … So I just wanted to know is it possible to build a game for each resolution… Script would fix the collider issue but other problems would exist. SO IS THERE ANY SOLUTION …PLS HELP ANY ASSISTANCE IS APPRECIATED !!!
THANK U IN ADVANCE FOR SUGGESTIONS…
To do this, you can use the screen coords to make sure the player doesn’t exit them. No colliders needed
void Update() {
//declare a temporary variable that holds the current position
Vector3 playerPos = transform.position;
//clamp the temporary variable's x value
playerPos.x = Mathf.Clamp(-300,300);
//assign the complete temp variable back to the transform
transform.position = playerPos;
}
Along with
Thanks mate ,
But what if am designing a level with particular transform.position for a object , The position would actually change
in other resolutions…
Do I need a different builds for every resolution ?
I am newbie in those stuffs…(pls bare me)
Correct me if I am wrong
thanks