Exemplo n.º 1
0
        public static void Load(string sid)
        {
            if (_lastSid == sid)
            {
                return;
            }

            var location = ProjectData.ProjectStructure.GetProjectScene(sid);

            if (location == null)
            {
                LogManager.GetCurrentClassLogger().Error("Location not found!");
                return;
            }

            _lastSid = sid;
            LoaderAdapter.LoadProject(ProjectData.ProjectId, location.Id, ProjectData.ProjectConfigurationId);
            ProjectData.SceneCleared += ResetLastSid;

            void ResetLastSid()
            {
                ProjectData.SceneCleared -= ResetLastSid;
                _lastSid = string.Empty;
            }
        }
Exemplo n.º 2
0
        public void LocationChanged(ProjectSceneArguments changedLocation)
        {
            ProjectData.ProjectStructure.UpdateProjectScene(changedLocation.Scene);
            ProjectData.ProjectStructure.UpdateOrAddLocationPrefab(changedLocation.Location);

            if (ProjectData.SceneId == changedLocation.Scene.Id && ProjectData.LocationId != changedLocation.Scene.LocationId)
            {
                LoaderAdapter.LoadProject(ProjectData.ProjectId, changedLocation.Scene.Id, ProjectData.ProjectConfigurationId);
            }
        }
Exemplo n.º 3
0
        private void ApplyConfig()
        {
            if (LaunchArguments == null)
            {
                _launch = true;

                return;
            }

            LoaderAdapter.LoadProject(LaunchArguments);
            UpdateSettings(LaunchArguments);
            LaunchArguments = null;
        }