- Home /
Question by
isaacduncan02 · Mar 25, 2018 at 04:53 PM ·
transform2d gamescalesize
How do you Scale Game Objects with the Screen?
In my current game, I try scale a 2D Circle.
gameObject.transform.localScale = new Vector2(gameObject.transform.localScale.x * GameManager.ratio, gameObject.transform.localScale.y * GameManager.ratio);
GameManager.ratio is calculated by Screen.height/Screen.width.
So far the scaling is okay, but I think it could be improved. How would I go on about it? I've seen someone use orthographic camera size but I don't really understand the function of it.
Comment