Put a picture on the whole Unity screen 5



  • We need to put the picture on the screen. Covering everything. The idea is to create a second camera, put a picture of her as a background, at the right moment, to turn it on. Can that be easier?



  • It's easier than that. Wherever it's easier to turn onSetActive(true)) or disconnect (SetActive(false)Something at the right moment? One team on one action and one team on the other.

    The only thing you don't want to carry an extra camera, etc. you're probably using UI, is that we can use it. I mean.

    • Adding to Canvas (i.e. UI) is an empty object. Call him. Overlay and say the width and height of the screen:

      введите сюда описание изображения

    • We're adding descendants to this facility. UI -> Image Image doesn't take a simple picture, but sprite. That means you have to make a picture of a type of spright. If you want a clean picture, you can instead. Image to choose RawImage) We've got a flow. OverlayBackground

      введите сюда описание изображения

      who can make a picture or just a monotonic color paint or make transparency.


    And in the end, that's exactly what it is. Overlay We're doing what we want. OverlayBackgroundadding any other objects, such as displaying the results of the game or the menu or exit button.

    Well, of course we're on or off at the right moment.


    Example hierarchy:

    введите сюда описание изображения




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2