示例#1
0
        public void Start()
        {
            terrainSettings = voxelEngine.terrainSettings;
            generateButton.onClick.AddListener(OnGenerateClick);

            terrainOptions.SetActive(true);
        }
示例#2
0
        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();
                }
            }
        }