public void SetSceneBoundary() { RexCamera camera = Camera.main.GetComponent <RexCamera>(); if (camera != null) { if (edge == Edge.Left) { camera.boundariesMin.x = transform.position.x + CameraHelper.GetScreenSizeInUnits().x * 0.5f; } else if (edge == Edge.Right) { camera.boundariesMax.x = transform.position.x - CameraHelper.GetScreenSizeInUnits().x * 0.5f; } else if (edge == Edge.Bottom) { camera.boundariesMin.y = transform.position.y + CameraHelper.GetScreenSizeInUnits().y * 0.5f; } else if (edge == Edge.Top) { camera.boundariesMax.y = transform.position.y - CameraHelper.GetScreenSizeInUnits().y * 0.5f; } } }
public void SetCamera(RexCamera _camera) { camera = _camera; }