unity access camera script from another object code example
Example 1: unity access phone camera
WebCamTexture webcamTexture = new WebCamTexture();
Renderer renderer = GetComponent<Renderer>();
renderer.material.mainTexture = webcamTexture;
webcamTexture.Play();
Example 2: how to import camera pos in unity
Camera maincam = GameObject.Find("Main Camera").GetComponent<Camera>(); Debug.Log(maincam.transform.position);