CopyActiveRenderTextureToHeightmap(RectInt, Vector2Int, TerrainHeightmapSyncControl)
Copies the specified part of the active RenderTexture to the Terrain heightmap texture.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.TerrainModule
public void CopyActiveRenderTextureToHeightmap(RectInt sourceRect, Vector2Int dest, TerrainHeightmapSyncControl syncControl)
Parameters
The part of the active Render Texture to copy.
The X and Y coordinates of the heightmap texture to copy into.
Controls how CPU synchronization is performed.
Remarks
This functions calls TerrainData.DirtyHeightmapRegion internally and sends out the OnTerrainChanged message accordingly.
The range of expected height values for the active RenderTexture is between and . This is unlike TerrainData.SetHeights, which expects height values between and . Additional Resources: TerrainHeightmapSyncControl, TerrainData.DirtyHeightmapRegion, TerrainData.SyncHeightmap.
00.501