Example #1
0
        public void unloadScene(AnomalyController anomalyController)
        {
            if (shown)
            {
                if (editInterface != null)
                {
                    editInterface.IconReferenceTag = AnomalyIcons.Project;
                }

                shown = false;
                instanceGroup.destroyInstances(anomalyController.SimObjectController);

                foreach (ProjectReference reference in projectData.ProjectReferences.ReferencedProjectNames)
                {
                    Project subProject = solution.getProject(reference.ProjectName);
                    if (subProject != null)
                    {
                        subProject.unloadScene(anomalyController);
                    }
                    else
                    {
                        Log.Error("Could not find referenced project {0} for project {1}. Project could not be destroyed.", reference.ProjectName, Name);
                    }
                }
            }
        }