文档

Unity Engine

Unity Engine

Using Terrain at runtime

Create Terrain dynamically at runtime
阅读时间1 分钟最后更新于 2 个月前

The Terrain system uses dedicated Unity engine resources to function correctly. Unity includes these resources in your application at build time when you have at least one Terrain instance in a scene that's part of your build profile.
If your application only creates Terrain instances at runtime, make sure you include at least one Terrain component as a placeholder in a scene listed by your build profile. Unity detects the placeholder and includes the required resources at build time.
提示
If you're not using the placeholder in your application, you can hide it. Either deactivate the GameObject that contains the Terrain component or put this GameObject in a scene that your application doesn't load.