Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
エディタ上でパーリンノイズによる地形を生成するサンプル
public override void OnInspectorGUI()
{
var generator = (FieldGenerator) target;
DrawDefaultInspector();
if (GUILayout.Button("フィールドの生成"))
{
GenerateFieldOnEditor(generator);
}
EditorGUILayout.Space();
if (GUILayout.Button("フィールドパーツの削除"))
{
RemoveFieldParts(generator);
}
EditorGUILayout.Space();
if (GUILayout.Button("フィールドメッシュの結合"))
{
CombineFieldParts(generator);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment