public void Start() { terrainSettings = voxelEngine.terrainSettings; generateButton.onClick.AddListener(OnGenerateClick); terrainOptions.SetActive(true); }
public override void OnInspectorGUI() { voxelEngine = target as VoxelEngine; terrainSettings = voxelEngine.terrainSettings; serializedObject.Update(); ShowMainTabs(); serializedObject.ApplyModifiedProperties(); GUILayout.Space(10); if (!terrainSettings.infiniteTerrain) { if (GUILayout.Button("Generate", GUILayout.Height(30))) { voxelEngine.GenerateTerrain(); } } }