Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

No Cameras Shown Available When Setting Canvas Screen Space Camera from Editor

Discussion in 'Editor & General Support' started by sjmill01, Mar 21, 2020.

  1. sjmill01

    sjmill01

    Joined:
    Jan 21, 2015
    Posts:
    3
    When I try to tie a canvas UI to a camera, I do not have any cameras shown in the picker for Render Camera. This is in Unity 20193.6f1.

    Is there a setting on cameras that must be performed for them to show in the picker. Or, is there a way the hierarchy should be linked for it to show?

    Thanks,
    Sean
     
  2. Gordon_G

    Gordon_G

    Joined:
    Jun 4, 2013
    Posts:
    358
    At the top of the picker are two tabs: Asset and Scene. Do you have a camera asset, or you want to select a camera from the Scene? Maybe you know this: you can just drag a camera from the hierarchy to the Event Camera field in the Canvas Component inspector...
     
  3. sjmill01

    sjmill01

    Joined:
    Jan 21, 2015
    Posts:
    3
    Thanks. For some reason, when I drag it, it won't drop.

    My end solution was to get it programmatically with this:

    Code (CSharp):
    1. GameObject.Find("Canvas").GetComponent<Canvas>().worldCamera = GameObject.Find("the_cam").GetComponent<Camera>();
    Thanks,
    Sean
     
    Gordon_G likes this.