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

Getting view from a camera in another scene at runtime

Discussion in 'Scripting' started by KingOfWhales, Nov 12, 2019.

  1. KingOfWhales

    KingOfWhales

    Joined:
    Sep 14, 2019
    Posts:
    4
    I am making a 2D platformer fighter, and I am creating a map selection screen.

    The way each map looks right now is very volatile and being changed often, but I would still like to have a preview of each map in the map select scene. Is it possible to, at runtime, get images of what each map scene looks like to be viewed in the map selection scene? If so, how would I go about doing this in a clean way without loading each map beforehand?

    Thanks!
     
  2. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,748
    Just take a screenshot of each one and use that.
     
  3. KingOfWhales

    KingOfWhales

    Joined:
    Sep 14, 2019
    Posts:
    4
    What I am trying to achieve is a system where I don't have to manually take a screenshot every time the map changes, rather it automatically gets images of the scenes at runtime.
     
  4. VladimirGordeev

    VladimirGordeev

    Joined:
    May 16, 2017
    Posts:
    11
    you can write a build script that will do it for you
     
  5. Antistone

    Antistone

    Joined:
    Feb 22, 2014
    Posts:
    2,835
    Scenes don't "exist" in the game until they are loaded. In order to get a camera to render another scene, you would first need to load that scene.

    Loading the scenes for every level in your entire game just so you can display them in your menu is probably a bad idea.