-
-
Save todorok1/9b139488f9253c58a94678180137e782 to your computer and use it in GitHub Desktop.
TerrainのHeightMapを生成するスクリプト(設定を保持するクラス)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
/// <Summary> | |
/// Terrainのハイトマップ(HeightMap)を生成するクラスです。 | |
/// </Summary> | |
public class TerrainGenerator : MonoBehaviour | |
{ | |
// 高さを変更するTerrainのデータをアサインします。 | |
public TerrainData terrainData; | |
// パーリンノイズに関する情報です。 | |
public float xOrigin; | |
public float yOrigin; | |
public float scale = 0.03f; | |
// 高さの補正値です。 | |
public float heightMultiply = 1f; | |
// パーリンノイズのオフセットで使用する乱数のシードです。 | |
public int seed = 0; | |
// パーリンノイズを重ね合わせる回数を設定します。 | |
public int multipleTimes = 2; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment