i have a 2d game for mobile. in the right side there is a canon and from left side enemies keeps coming. so for this level i need to orient camera on right side showing the cannon. how can i achive this. on some devices the canon becomes invisible. as a regular game i dont want solutions such as fit the screen. the left portion can be adjusted but right side should be always visible
i made a quick fix like this.
i placed a sprite with 1 px width and height and named it dot. then used the below script
void Update () {
GameObject go = GameObject.Find ("dot");
if (!go.renderer.isVisible) {
transform.position = new Vector3(transform.position.x - 0.01f,transform.position.y,transform.position.z);
}
}