Search Unity

Video Can a camera render a image as the background instead of solid color?

Discussion in 'Audio & Video' started by Airmouse, May 9, 2020.

  1. Airmouse

    Airmouse

    Joined:
    Jan 12, 2019
    Posts:
    107
    Hi, I am trying to set the background of one of my cameras to be a texture but I am unsure how to do this:



    Is there any code I can write that will allow me to specify a texture to be used as the background for the camera?

    I do not know if different size images would play nice, but would it be possible to stretch the image so it fills the entire background?

    Thanks anyone for any help!
     
  2. marc_tanenbaum

    marc_tanenbaum

    Unity Technologies

    Joined:
    Oct 22, 2014
    Posts:
    637
    Hiya. This question might get a better response in a more appropriate forum. Video deals with streaming video (think YouTube, MPEG, that sort of thing). You probably want either the Graphics forum or the general help forum.

    (BTW, as a quick hint...if your game is 3D, search for Skybox...that's what you'd want. I'm less certain if there's a "correct" way to do a 2D background, but you could just put an image behind the action.)
     
    Airmouse likes this.