Ejemplo n.º 1
0
        public void PrefabImported(string prefabPath)
        {
            // Find the import behaviour that was waiting on this prefab to be imported
            string          asset           = Path.GetFileName(prefabPath);
            ImportBehaviour importComponent = ImportBehaviour.FindImportBehavior_ByWaitingPrefab(asset);

            if (importComponent != null)
            {
                // The prefab has finished loading. Keep track of that status.
                if (!importComponent.ImportComplete_Prefabs.Contains(asset, StringComparer.OrdinalIgnoreCase))
                {
                    importComponent.ImportComplete_Prefabs.Add(asset);
                }

                // Are we done importing all Prefabs? If so then we have completed the import process.
                if (importComponent.IsPrefabImportingCompleted())
                {
                    importComponent.ReportPrefabImport(prefabPath);
                    importComponent.DestroyImportBehaviour();
                }
            }
        }