TerrainNeighbors.cs 461 B

123456789101112131415161718192021
  1. using UnityEngine;
  2. using System.Collections;
  3. using System;
  4. namespace WorldComposer
  5. {
  6. [Serializable]
  7. public class TerrainNeighbors : MonoBehaviour
  8. {
  9. public Terrain left;
  10. public Terrain top;
  11. public Terrain right;
  12. public Terrain bottom;
  13. void Start()
  14. {
  15. Terrain terrain = (Terrain)GetComponent(typeof(Terrain));
  16. terrain.SetNeighbors(left, top, right, bottom);
  17. }
  18. }
  19. }