Beispiel #1
0
        private void Update()
        {
            Camera camera = this.GetComponent <Camera>();

            camera.SetPixelSizeCentered(resolution.GetFillByMultiplier(ScreenExtensions.GetSize(), 2.0f));
            camera.SetOrthographicSize(resolution / pixels_per_unit);
        }
Beispiel #2
0
 static public void SetPixelSizeCentered(this Camera item, Vector2 size)
 {
     item.pixelRect = RectExtensions.CreateCenterRect(ScreenExtensions.GetCenter(), size);
 }