Пример #1
0
        private IEnumerator DoEditorMeshSilentBuild()
        {
            while (true)
            {
                // Only proceed if Unity coliders are not being used
                if (!RuntimeEditorApplication.Instance.UseUnityColliders)
                {
                    if (_silentBuildMeshes.Count < _maxNumberOfSilentBuildMeshes)
                    {
                        while (_silentBuildMeshes.Count < _maxNumberOfSilentBuildMeshes && _sortedSilentBuildCandidates.Count != 0)
                        {
                            EditorMesh editorMesh = _sortedSilentBuildCandidates[0];
                            _silentBuildMeshes.Add(editorMesh);
                            editorMesh.StartSilentTreeBuild();

                            _sortedSilentBuildCandidates.RemoveAt(0);
                        }
                    }

                    _silentBuildMeshes.RemoveAll(item => !item.IsBuildingTreeSilent);
                }

                yield return(null);
            }
        }
Пример #2
0
        private IEnumerator DoEditorMeshSilentBuild()
        {
            while (true)
            {
                if (_silentBuildMeshes.Count < _maxNumberOfSilentBuildMeshes)
                {
                    while (_silentBuildMeshes.Count < _maxNumberOfSilentBuildMeshes && _sortedSilentBuildCandidates.Count != 0)
                    {
                        EditorMesh editorMesh = _sortedSilentBuildCandidates[0];
                        _silentBuildMeshes.Add(editorMesh);
                        editorMesh.StartSilentTreeBuild();

                        _sortedSilentBuildCandidates.RemoveAt(0);
                    }
                }

                _silentBuildMeshes.RemoveAll(item => !item.IsBuildingTreeSilent);
                yield return(null);
            }
        }