예제 #1
0
        public void GenerateRuntimeMesh()
        {
            if (_rGen == null)
            {
                _rGen = new RandomGen();
            }
            _rGen.seed = seed;
//		    Debug.Log("GenerateRuntimeMesh "+seed);
            GenerateMesh.Generate(this);
//		    Debug.Log(_volumes.Count);
            for (int v = 0; v < _volumes.Count; v++)
            {
                _volumes[v].GenerateRuntimeMesh();
            }
        }
예제 #2
0
        private void Update()
        {
            HUtils.log();
#if UNITY_EDITOR
            if (building.regenerate)
            {
                UnityEditor.Undo.SetCurrentGroupName("Regenerate Building");
                int group = UnityEditor.Undo.GetCurrentGroup();
                building.MarkGenerated();
                GenerateMesh.Generate(building);

                Renderer[] renders = transform.GetComponentsInChildren <Renderer>();
                UnityVersionWrapper.SetSelectedWireframeHidden(renders, !building.showWireframes);

                UnityEditor.Undo.CollapseUndoOperations(group);
            }
#endif
        }