TileContainer.cs 415 B

12345678910111213141516171819
  1. using UnityEngine;
  2. namespace MTE
  3. {
  4. /// <summary>
  5. /// Tiled mesh terrain container, this component can be saved removed when building.
  6. /// </summary>
  7. public class TileContainer : MonoBehaviour
  8. {
  9. public void OnEnable()
  10. {
  11. if (!Application.isEditor)
  12. {
  13. // remove this component
  14. Destroy(this);
  15. }
  16. }
  17. }
  18. }