Search Unity

[Solved]Scenes Help

Discussion in 'Editor & General Support' started by SpiritWebb, Nov 23, 2009.

  1. SpiritWebb

    SpiritWebb

    Joined:
    Nov 10, 2009
    Posts:
    38
    The project I am working on consists in Outer Space. And now I am confused.

    I have placed a phase gate in the scene to allow travel to a new star system. How do I create NEW scenes, and link each scene via the phase gate?

    I'm lost, any help would be appreciated. Thanks in advance.

    ----
    (Note: I am still NEW to Unity, and am using the Unity Free version).
     
  2. SpiritWebb

    SpiritWebb

    Joined:
    Nov 10, 2009
    Posts:
    38
    Control-N to create a new scene (command-N for Mac) but still confused on linking the scenes via the phase gate
     
  3. SarperS

    SarperS

    Joined:
    Mar 10, 2009
    Posts:
    824
    You have to create a script and attach it to your phase gate.

    Something like this in pseudo code;

    If Player collides with the Phase Gate Collider
    Application.LoadLevel(Nextlevel Number)
     
  4. SpiritWebb

    SpiritWebb

    Joined:
    Nov 10, 2009
    Posts:
    38
    And they can arrive at any location the phase gate is located in the next scene, and they can return to the previous scene they were just in?
     
  5. SarperS

    SarperS

    Joined:
    Mar 10, 2009
    Posts:
    824
    On the new scene, place your player prefab where you want them to appear and when the new scene is loaded they will start right there.

    But returning to the last scene and appearing in the last position takes some work. Easiest way would be dublicating the first scene WITH the player in the phase gate position, but it's not practical if you are planning to place a lot of gates and you will have a lot of levels.
     
  6. SarperS

    SarperS

    Joined:
    Mar 10, 2009
    Posts:
    824
  7. SpiritWebb

    SpiritWebb

    Joined:
    Nov 10, 2009
    Posts:
    38

    There are a total of 15 maps in the first galaxy. Each one having 1 or more phase gates to take you to different systems.

    I would probably only want the starting star system (for each race) not destroyed. Every other system would be fine, based on the previous statement you said above...
     
  8. SarperS

    SarperS

    Joined:
    Mar 10, 2009
    Posts:
    824
    Yep, you are welcome :)
     
  9. SpiritWebb

    SpiritWebb

    Joined:
    Nov 10, 2009
    Posts:
    38
    Thanks!