Search Unity

How use ARCameraBackground material on other GameObject?

Discussion in 'AR' started by aronsommer, Mar 19, 2020.

  1. aronsommer

    aronsommer

    Joined:
    Dec 5, 2010
    Posts:
    202
    I want to use the ARCameraBackground material on an other GameObject.

    I think on Android the material is called "Unlit/ARCoreBackground (Instance)".

    This does not work:

    Code (CSharp):
    1. public GameObject MyARCamera;
    2. var material = planeGo.GetComponentInChildren<MeshRenderer>().material;
    3. material = MyARCamera.GetComponent<ARCameraBackground>().material;