Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Switching scenes in the golf game.

Discussion in 'World Building' started by SaintKnowledge, Dec 30, 2022.

  1. SaintKnowledge

    SaintKnowledge

    Joined:
    Nov 25, 2022
    Posts:
    3
    In the golf game, when the holes change, I am wondering whether to draw 18 holes on one terrain or draw 1 hole on 18 terrains. Which is the better way from a technical point of view?
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,136
    18 seperate terrains are heavier then 1 big one.
    1 small terrain is more performance than 1 big terrain.
    Depends on how your game is made
     
    SaintKnowledge likes this.
  3. SaintKnowledge

    SaintKnowledge

    Joined:
    Nov 25, 2022
    Posts:
    3
    Thank you for your advice.
    If I draw 18 Terrains, how do I switch the next hole(Terrain) on the C#?
    Or is it better to switch the scene?
     
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,136
    Either:
    - enable and disable gameobjects (can be memory heavy)
    - Spawn and destroy prefabs
    - Maybe scriptable objects? (Load in the terrain data itself?)
     
    SaintKnowledge likes this.
  5. SaintKnowledge

    SaintKnowledge

    Joined:
    Nov 25, 2022
    Posts:
    3
    Thanks!
    I will try them.
     
    DevDunk likes this.