CopyActiveRenderTextureToHeightmap(RectInt, Vector2Int, TerrainHeightmapSyncControl)
Copies the specified part of the active RenderTexture to the Terrain heightmap texture.
읽는 시간 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