Search Unity

3D prefabs instead of whole 3d world in racing game.

Discussion in 'Scripting' started by Adrenaline-Crew, Apr 29, 2014.

  1. Adrenaline-Crew

    Adrenaline-Crew

    Joined:
    Dec 14, 2010
    Posts:
    400
    Does anyone feel there is a way to have levels of a racing game "appear" instead of always be there? So there are not 300 assists in my game which makes the Levels each over 20 megs?

    Meaning, when you drive, you are on a prefab, and when the player gets to a trigger, it will activate the next prefab road, which will be one of 4. Left, Right, Straight or Hill.
     
  2. Suddoha

    Suddoha

    Joined:
    Nov 9, 2013
    Posts:
    2,824
    You could activate the next piece of road if you enter the trigger and deactivate some other behind you (if you do not plan to go back), if you don't just want to decrease the number of active objects, you could have an amount of let's just say 12 pieces in your scene ( 3 of each kind) and move them around as soon as you enter a trigger.... like, taking the last one and put it in front. But you need to find all the exact positions and specify for each trigger event which gameobject will be moved to which position.
    If that makes any sense at all. xD
     
  3. Adrenaline-Crew

    Adrenaline-Crew

    Joined:
    Dec 14, 2010
    Posts:
    400
    Good call, i really like that idea Suddoha