Finish() public method

public Finish ( ) : void
return void
Esempio n. 1
0
        private void ExportScene()
        {
            EditorUtility.DisplayProgressBar(ProgressbarTitle, ProgressbarMessage, 0);

            try
            {
                var mapExporter = new PokemonMapExporter(_mapFileName, _mapName, _mapId, _gameModePath, _createMissingFolders, _exportModels);

                var allGameObjects = GetSceneGameObjectsFlatten();
                var index = 0;
                foreach (var gameObject in allGameObjects)
                {
                    index++;
                    EditorUtility.DisplayProgressBar(ProgressbarTitle, string.Format("Exporting GameObject {0} of {1}", index, allGameObjects.Count), index / (float)allGameObjects.Count);
                    var relevant = mapExporter.ProcessGameObject(gameObject);

                    if (!relevant) Debug.Log(string.Format("Game Object '{0}' was not exported because no relevant components present.", gameObject.name));
                }

                mapExporter.Finish();

                Debug.Log(string.Format("Exported {0} of {1} game objects.", mapExporter.ExportedEntityCount, mapExporter.TotalEntityCount));
            }
            finally
            {
                EditorUtility.ClearProgressBar();
            }
        }
Esempio n. 2
0
        private void ExportScene()
        {
            EditorUtility.DisplayProgressBar(ProgressbarTitle, ProgressbarMessage, 0);

            try
            {
                var mapExporter = new PokemonMapExporter(_mapFileName, _mapName, _mapId, _gameModePath, _createMissingFolders, _exportModels);

                var allGameObjects = GetSceneGameObjectsFlatten();
                var index          = 0;
                foreach (var gameObject in allGameObjects)
                {
                    index++;
                    EditorUtility.DisplayProgressBar(ProgressbarTitle, string.Format("Exporting GameObject {0} of {1}", index, allGameObjects.Count), index / (float)allGameObjects.Count);
                    var relevant = mapExporter.ProcessGameObject(gameObject);

                    if (!relevant)
                    {
                        Debug.Log(string.Format("Game Object '{0}' was not exported because no relevant components present.", gameObject.name));
                    }
                }

                mapExporter.Finish();

                Debug.Log(string.Format("Exported {0} of {1} game objects.", mapExporter.ExportedEntityCount, mapExporter.TotalEntityCount));
            }
            finally
            {
                EditorUtility.ClearProgressBar();
            }
        }