Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Syncing terrain over Network

Discussion in 'Editor & General Support' started by CazicThule, Aug 11, 2013.

  1. CazicThule

    CazicThule

    Joined:
    Nov 29, 2012
    Posts:
    95
    Say I have a procedurally generated Unity terrain on the host side, is there a way of sending the terrain map (including textures) over the network to the client players so everyone sees the same terrain?
     
  2. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,649
    Sure. Send your procedurally generated terrain heights/splat values to the clients and have them use the TerrainData class to put those values into an actual terrain.

    Textures similarly you'd use GetPixels()/SetPixels() to read the textures on the host side and reconstruct them on the client side.