public override void Update(HomeWindow self) { if (this.mReq != null) { if (!this.mReq.isDone) { return; } if (UnityEngine.Object.op_Inequality(this.mReq.asset, (UnityEngine.Object)null)) { this.mInstance = UnityEngine.Object.Instantiate(this.mReq.asset) as GameObject; } this.mReq = (LoadRequest)null; } if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.mInstance, (UnityEngine.Object)null) && !this.mHasNotifiedRankmatch) { this.mHasNotifiedRankmatch = true; self.mRankmatchRewarded = false; FlowNode_GameObject.ActivateOutputLinks((Component)self, 1000); } if (!self.mRankmatchRewarded) { return; } if (!self.mBeginnerShown) { self.mBeginnerShown = true; self.mStateMachine.GotoState <HomeWindow.State_BeginnerNotify>(); } else { self.MiscBeforeDefaultState(); self.mStateMachine.GotoState <HomeWindow.State_Default>(); } }
public async Task <MediaStatus> LoadMedia( ChromecastApplication application, Uri mediaUrl, string contentType, CancellationToken token, IMetadata metadata = null, string streamType = "BUFFERED", double duration = 0D, object customData = null, Track[] tracks = null, int[] activeTrackIds = null, bool autoPlay = true, double currentTime = 0D) { int requestId = RequestIdProvider.Next; var mediaObject = new MediaData(mediaUrl.ToString(), contentType, metadata, streamType, duration, customData, tracks); var req = new LoadRequest(requestId, application.SessionId, mediaObject, autoPlay, currentTime, customData, activeTrackIds); var reqJson = req.ToJson(); var requestCompletedSource = await AddRequestTracking(requestId, token).ConfigureAwait(false); await Write(MessageFactory.Load(application.TransportId, reqJson), token).ConfigureAwait(false); return(await requestCompletedSource.Task.WaitOnRequestCompletion(token).ConfigureAwait(false)); }
public void LoadAssetAsync(string path, Callback_1 <UnityEngine.Object> loadDoneCallBack) { UnityEngine.Object asset; if (assertDic.TryGetValue(path, out asset)) { loadDoneCallBack(asset); return; } LoadRequest request; if (loadRequestDic.TryGetValue(path, out request)) { request.callback.Add(loadDoneCallBack); } else { request = new LoadRequest(); request.assetPath = path; request.callback = new List <Callback_1 <UnityEngine.Object> >(); request.callback.Add(loadDoneCallBack); loadRequestDic.Add(path, request); startCoroutine(loadLocalAsset(request)); } }
private IEnumerator Load(LoadRequest request) { Texture2D texture = null; var file = string.Format("file:///" + Path.Combine(Application.streamingAssetsPath, "Tiles_MIP{2}_Y{1}_X{0}.png"), request.PageX >> request.MipLevel, request.PageY >> request.MipLevel, request.MipLevel); Debug.Log("load texture:" + file); var www = UnityWebRequestTexture.GetTexture(file); yield return(www.SendWebRequest()); if (!www.isNetworkError && !www.isHttpError) { texture = ((DownloadHandlerTexture)www.downloadHandler).texture; } else { Debug.LogWarningFormat("Load file({0}) failed: {1}", file, www.error); } m_RuningRequests.Remove(request); if (texture) { m_debugTexture = texture; } OnLoadCompleteEvent?.Invoke(request, texture); }
public void SendsAndReceives() { IClient client = CreateClient(); Assembly assembly = new Assembly ( name: "myName", description: "", homepage: "", repository: new Assembly.AssemblyRepository(type: "", url: ""), author: new Person(name: "", roles: Array.Empty <string>()), fingerprint: "", license: "", targets: new AssemblyTargets(new AssemblyTargets.DotNetTarget( @namespace: "Dot.Net.Namespace", packageId: "Dot.Net.PackageId" )), version: "myVersion", types: new Dictionary <string, Type>() ); _runtime.ReadResponse().Returns(GetOkResponse(new LoadResponse(assembly.Name, 0))); client.Load(assembly.Name, assembly.Version, "tgz"); LoadRequest expectedRequest = new LoadRequest(assembly.Name, assembly.Version, "tgz"); _runtime.Received().WriteRequest(Arg.Is <string>( actual => PlatformIndependentEqual(JsonConvert.SerializeObject(expectedRequest), actual) )); _runtime.Received().ReadResponse(); }
internal void OnAreasLoaded(int messageId, List <ClientArea> areas) { List <ClientSegment> segments = new List <ClientSegment>(areas.Count * 512); foreach (ClientArea area in areas) { List <ClientSegment> areaSegments = area.GetSegments(); segments.AddRange(areaSegments); Areas.Add(area.Key, area); foreach (ClientSegment segment in areaSegments) { Segments.Add(segment.Key, segment); } } LoadRequest request = new LoadRequest() { Entity = _Player, MessageId = messageId }; OnAreasLoaded(request, areas, segments); if (_Player.CurrentSegment == null) { // prepare the player _Player.HandleMovement(); } }
/// <summary> /// Load document for editing /// </summary> /// <param name="request">Request. <see cref="LoadRequest" /></param> /// <returns><see cref="LoadResult"/></returns> public LoadResult Load(LoadRequest request) { // verify the required parameter 'loadOptions' is set if (request.loadOptions == null) { throw new ApiException(400, "Missing required parameter 'loadOptions' when calling Load"); } // create path and map variables var resourcePath = this.configuration.GetServerUrl() + "/editor/load"; resourcePath = Regex .Replace(resourcePath, "\\*", string.Empty) .Replace("&", "&") .Replace("/?", "?"); var postBody = SerializationHelper.Serialize(request.loadOptions); // http body (model) parameter var response = this.apiInvoker.InvokeApi( resourcePath, "POST", postBody, null, null); if (response != null) { return((LoadResult)SerializationHelper.Deserialize(response, typeof(LoadResult))); } return(null); }
public override void Begin(HomeWindow self) { PlayerData player = MonoSingleton <GameManager> .Instance.Player; if (!player.HasQueuedLoginBonus) { return; } this.mLoginBonusType = player.DequeueNextLoginBonusTableID(); if (string.IsNullOrEmpty(this.mLoginBonusType)) { return; } string bonusePrefabName = player.GetLoginBonusePrefabName(this.mLoginBonusType); if (string.IsNullOrEmpty(bonusePrefabName)) { if (string.IsNullOrEmpty(self.LoginBonusPath)) { return; } this.mReq = AssetManager.LoadAsync <GameObject>(self.LoginBonusPath); } else { this.mReq = AssetManager.LoadAsync <GameObject>("UI/LoginBonus/" + bonusePrefabName); } }
public static void Postfix(CombatGameState __instance) { Mod.Log.Trace?.Write("CGS:_I entered."); DataManager dm = UnityGameInstance.BattleTechGame.DataManager; LoadRequest loadRequest = dm.CreateLoadRequest(); // Need to load each unique icon Mod.Log.Info?.Write("LOADING EFFECT ICONS..."); loadRequest.AddLoadRequest <SVGAsset>(BattleTechResourceType.SVGAsset, Mod.Config.Icons.ElectronicWarfare, null); loadRequest.AddLoadRequest <SVGAsset>(BattleTechResourceType.SVGAsset, Mod.Config.Icons.SensorsDisabled, null); loadRequest.AddLoadRequest <SVGAsset>(BattleTechResourceType.SVGAsset, Mod.Config.Icons.VisionAndSensors, null); loadRequest.AddLoadRequest <SVGAsset>(BattleTechResourceType.SVGAsset, Mod.Config.Icons.TargetSensorsMark, null); loadRequest.AddLoadRequest <SVGAsset>(BattleTechResourceType.SVGAsset, Mod.Config.Icons.TargetVisualsMark, null); loadRequest.AddLoadRequest <SVGAsset>(BattleTechResourceType.SVGAsset, Mod.Config.Icons.TargetTaggedMark, null); loadRequest.AddLoadRequest <SVGAsset>(BattleTechResourceType.SVGAsset, Mod.Config.Icons.TargetNarcedMark, null); loadRequest.AddLoadRequest <SVGAsset>(BattleTechResourceType.SVGAsset, Mod.Config.Icons.TargetStealthMark, null); loadRequest.AddLoadRequest <SVGAsset>(BattleTechResourceType.SVGAsset, Mod.Config.Icons.TargetMimeticMark, null); loadRequest.AddLoadRequest <SVGAsset>(BattleTechResourceType.SVGAsset, Mod.Config.Icons.TargetECMShieldedMark, null); loadRequest.AddLoadRequest <SVGAsset>(BattleTechResourceType.SVGAsset, Mod.Config.Icons.TargetActiveProbePingedMark, null); loadRequest.ProcessRequests(); Mod.Log.Info?.Write(" ICON LOADING COMPLETE!"); ModState.Combat = __instance; }
public static void Postfix(SimGameState __instance) { LoadRequest loadRequest = __instance.DataManager.CreateLoadRequest(null, true); loadRequest.AddAllOfTypeBlindLoadRequest(BattleTechResourceType.LanceDef, new bool?(true)); loadRequest.ProcessRequests(10U); }
private void Update() { if ((double)this.UpdateInterval <= 0.0) { return; } if (this.mBannerLoadRequest != null) { if (!this.mBannerLoadRequest.isDone) { return; } if (Object.op_Inequality((Object)this.mTarget, (Object)null)) { this.mTarget.set_texture((Texture)(this.mBannerLoadRequest.asset as Texture2D)); } this.mBannerLoadRequest = (LoadRequest)null; } this.mInterval += Time.get_unscaledDeltaTime(); if ((double)this.mInterval < (double)this.UpdateInterval) { return; } this.mInterval = 0.0f; GameManager instance = MonoSingleton <GameManager> .Instance; List <string> stringList = new List <string>(); ChapterParam[] chapters = instance.Chapters; QuestParam[] availableQuests = instance.Player.AvailableQuests; long serverTime = Network.GetServerTime(); for (int index1 = 0; index1 < chapters.Length; ++index1) { bool flag = false; string banner = chapters[index1].banner; if (!string.IsNullOrEmpty(banner) && !stringList.Contains(banner)) { for (int index2 = 0; index2 < availableQuests.Length; ++index2) { if (availableQuests[index2].ChapterID == chapters[index1].iname && availableQuests[index2].IsDateUnlock(serverTime)) { flag = true; break; } } if (flag) { stringList.Add(banner); } } } if (stringList.Count <= 0) { return; } int index = (stringList.IndexOf(this.mLastBannerName) + 1) % stringList.Count; this.mLastBannerName = stringList[index]; this.mBannerLoadRequest = AssetManager.LoadAsync <Texture2D>("Banners/" + this.mLastBannerName); }
public static bool Prefix(MechLabStockInfoPopup __instance, ref string ___stockMechDefId, MechDef ___baseMechDef, UIManager ___uiManager) { try { Logger.Debug("[MechLabStockInfoPopup_LoadStockMech_PREFIX] ___baseMechDef.Description.Id: " + ___baseMechDef.Description.Id); if (!string.IsNullOrEmpty(___baseMechDef.Description.Model)) { Logger.Debug("[MechLabStockInfoPopup_LoadStockMech_PREFIX] ___baseMechDef.Description.Model: " + ___baseMechDef.Description.Model); ___stockMechDefId = ___baseMechDef.Description.Model.Replace("model", "mechdef"); Logger.Debug("[MechLabStockInfoPopup_LoadStockMech_PREFIX] ___stockMechDefId: " + ___stockMechDefId); LoadRequest loadRequest = ___uiManager.dataManager.CreateLoadRequest(null, false); // Created extension method MechLabStockInfoPopup.OverrideStockMechDefLoaded for callback loadRequest.AddLoadRequest <MechDef>(BattleTechResourceType.MechDef, ___stockMechDefId, new Action <string, MechDef>(__instance.OverrideStockMechDefLoaded), false); loadRequest.ProcessRequests(10u); return(false); } else { return(true); } } catch (Exception e) { Logger.Error(e); return(true); } }
public void AnalyzeAndLoad(string solutionFolder, string rootCsvFolder, string neo4jUrl, bool isRemote, string companyAssembliesPattern, string applicationsPattern) { try { var codeAnalyzer = BuildCodeAnalyzer(); var neoLoader = new NeoLoader(); var methodGraphs = codeAnalyzer.AnalyzeSolution(companyAssembliesPattern, applicationsPattern, solutionFolder); foreach (var methodGraph in methodGraphs) { var csvFolder = neoLoader.GenerateLocalCsvFiles(methodGraph, rootCsvFolder); var loadRequest = new LoadRequest() { Locality = isRemote ? Locality.Remote : Locality.Local, Neo4jUrl = neo4jUrl, ApplicationName = methodGraph.ApplicationName, GraphType = methodGraph.GraphType.ToString() }; neoLoader.BulkLoadCsv(loadRequest, csvFolder); } } catch (Exception ex) { Console.WriteLine(ex.ToString()); } }
private void Update() { if (this.mResourceRequest != null) { if (!this.mResourceRequest.isDone) { return; } if (Object.op_Equality(this.mResourceRequest.asset, (Object)null)) { Debug.LogError((object)("Failed to load '" + this.ResourcePath + "'")); ((Behaviour)this).set_enabled(false); } else { this.Target = this.mResourceRequest.asset as GameObject; this.mResourceRequest = (LoadRequest)null; this.CreateInstance(); this.ActivateOutputLinks(1); } } else { ((Behaviour)this).set_enabled(false); } }
private IEnumerator LoadAsyncImpl(LoadRequest request, Func <string, object> syncLoadFunc) { var req = Task.Run(() => { try { return(syncLoadFunc(_rootPath + "/" + request.fileName)); } catch (Exception e) { return(e); } }); yield return(req); if (req.Result is Exception) { request.SetError((req.Result as Exception).Message); } else { request.SetResult(req.Result); } }
public static void Postfix(PilotDef __instance, LoadRequest loadRequest) { if (__instance.PortraitSettings != null) { // perform this here on the first save load after character creation // this avoids all sorts of exceptions and problems with the character customization UIs // this also means we only need to do this in one patch instead of many if (!string.IsNullOrEmpty(__instance.PortraitSettings.Description.Icon)) { __instance.Description.SetIcon(__instance.PortraitSettings.Description.Icon); __instance.PortraitSettings = null; Logger.LogLine(string.Format("Applying Hardset Icon to Pilot: {0}, {1}", (object)__instance.Description.Callsign, (object)__instance.Description.Icon)); } } if (!string.IsNullOrEmpty(__instance.Description.Icon)) { //Logger.LogLine(string.Format("Loading Pilot: {0}, {1}", (object)__instance.Description.Callsign, (object)__instance.Description.Icon)); // Issue a Load request for any custom sprites try { Logger.LogLine(string.Format("Issuing Load Request Icon for Pilot: {0}, {1}", (object)__instance.Description.Callsign, (object)__instance.Description.Icon)); loadRequest.AddBlindLoadRequest(BattleTechResourceType.Sprite, __instance.Description.Icon, new bool?(false)); } catch (Exception e) { Logger.LogError(e); } } }
public static T LoadResource <T>(BattleTechResourceType resourceType, string resourceId, TimeSpan?timeout = null) where T : class { TimeSpan timeoutNotNull = timeout ?? TimeSpan.FromMinutes(1); DateTime errorTime = DateTime.Now + timeoutNotNull; T resource = null; GameInstance gameInstance = UnityGameInstance.BattleTechGame; DataManager dataManager = gameInstance.DataManager; LoadRequest loadRequest = dataManager.CreateLoadRequest(null, false); loadRequest.AddLoadRequest <T>(resourceType, resourceId, (s, resourceReturned) => { resource = resourceReturned; }, false); loadRequest.ProcessRequests(10u); do { dataManager.Update(UnityEngine.Time.deltaTime); if (DateTime.Now > errorTime) { throw new Exception("Failed to load resource: " + resourceId); } } while (resource is null); return(resource); }
public LoadResponseBuilder(ISession session, User user, LoadRequest loadRequest, string @group) { this.session = session; this.user = user; this.loadRequest = loadRequest; this.group = group; }
public List <Item> Operation(LoadRequest request) { if (request != null) { return(this.LoadItem(request.Name, request.Category)); } return(this.LoadItem()); }
public void AddLoadRequest(LoadRequest loadRequest) { loadRequestQueue.Enqueue(loadRequest); if (activeCoroutine == null) { activeCoroutine = StartCoroutine(ExecuteLoadRequests()); } }
/// @param request /// The load request to execute /// @param callback /// The function to call when the resource is loaded /// private void ExecuteRequest(LoadRequest request, Action callback) { ResourceUtils.LoadAndInstantiateGameObjectAsync(request.m_path, request.m_parent, request.m_name, (gameObject) => { request.m_callback.SafeInvoke(gameObject); callback.SafeInvoke(); }); }
public static async void LoadPlexMedia(this PlexChannel channel, ChromeCastClient client, PlexObject content) { var mediaObject = PlexMediaData.DataFromContent(content); var req = new LoadRequest(client.CurrentApplicationSessionId, mediaObject, true, 0, mediaObject.CustomData); var reqJson = req.ToJson(); await channel.Write(MessageFactory.Load(client.CurrentApplicationTransportId, reqJson)); }
private Task <Thumbnail> AddLoadRequest(LoadRequest req) { lock (_requests) { _requests.Add(req); } return(req.Completion.Task); }
static IEnumerator DoLoadFromFile(LoadRequest req) { yield return(null); Object obj = UnityEditor.AssetDatabase.LoadAssetAtPath("Assets/" + req.path, req.resType); req.DoCallBack(obj); }
public override void Begin(HomeWindow self) { if (string.IsNullOrEmpty(self.LoginInfoPath)) { return; } this.mReq = AssetManager.LoadAsync <GameObject>(self.LoginInfoPath); }
/// <summary> /// 定时器下,在每帧对下载队列进行检测 /// 如果下载有问题,或者超时,则清除 /// 如果下载完成,则解析下载结果,并进入completeDict中 /// </summary> public void CheckQueue() { if (!isLoading) { return; } foreach (KeyValuePair <string, LoadRequest> pair in loadDict) { LoadRequest request = pair.Value; request.loadTotalFrames++; // deal error if ((request.wwwObject != null && request.wwwObject.error != null) || request.isTimeOut) { if (request.requestURL.Contains(".apk") || request.requestURL.Contains(".ipa")) { return; } request.alreadyDeal = true; loadDict.Remove(request.requestURL); ErrorDelegateHandle(request); if (request.isTimeOut) { Debug.LogWarning("Load time out:" + request.requestURL); } else { Debug.LogWarning("Load error:" + request.requestURL); } MoveRequestFromWaitDictToLoadDict(); break; } // if (!request.alreadyDeal) { ProcessDelegateHandle(request); // if done if (request.wwwObject != null && request.wwwObject.isDone) { LoadParam param = ParseLoadParamFromLoadRequest(request); if (request.fileType != LoadFileType.BINARY) { completeDict.Add(request.requestURL, param); } // CompleteDelegateHandle(request, param); // request.alreadyDeal = true; loadDict.Remove(request.requestURL); MoveRequestFromWaitDictToLoadDict(); break; } } } }
private async void LoadDataButtonClick(object sender, EventArgs e) { InitializeResults(); bool loadDBLP = checkBoxDBLP.Checked; bool loadIEEEXplore = checkBoxIEEEXplore.Checked; bool loadGoogleScholar = checkBoxGoogleScholar.Checked; int initialYear = (int)numericUpDownInitialYear.Value; int finalYear = (int)numericUpDownFinalYear.Value; if (!loadDBLP && !loadIEEEXplore && !loadGoogleScholar) { richTextBoxErrors.Text = "Any source selected, please select at least one."; return; } LoadRequest loadRequest = new LoadRequest(loadDBLP, loadIEEEXplore, loadGoogleScholar, initialYear, finalYear); LoadAnswer loadAnswer; LoadingForm loadingForm = new LoadingForm(); ShowLoadingForm(); try { loadAnswer = await RequestsManager.GetRequestsManager().LoadDataFromDataSources(loadRequest); } catch (Exception) { richTextBoxErrors.Text = "It was not possible to connect to the warehouse."; CloseLoadingForm(); return; } ShowResults(loadAnswer, loadRequest.LoadFromDBLP, loadRequest.LoadFromIEEEXplore, loadRequest.LoadFromGoogleScholar); CloseLoadingForm(); void ShowLoadingForm() { new Task(() => loadingForm.ShowDialog()).Start(); this.Enabled = false; } void CloseLoadingForm() { loadingForm.Invoke((MethodInvoker) delegate { loadingForm.Close(); }); this.Enabled = true; } }
private SKBitmap Decode(byte[] buffer, LoadRequest req) { req.Cancellation.ThrowIfCancellationRequested(); using (var input = new MemoryStream(buffer)) { return(_imageLoader.LoadImage(req.Entity, input)); } }
public void RequestResourcesAndProcess(BattleTechResourceType resourceType, string resourceId, bool filterByOwnership = false) { LoadRequest loadRequest = UnityGameInstance.BattleTechGame.DataManager.CreateLoadRequest(delegate(LoadRequest request) { Main.LogDebug($"[RequestResourcesAndProcess] Finished load request for {resourceId}"); }, filterByOwnership); loadRequest.AddBlindLoadRequest(resourceType, resourceId); loadRequest.ProcessRequests(1000u); }
private void LoadResource() { if (this.mResourceRequest != null) { return; } DebugUtility.Log("Loading " + this.ResourcePath); this.mResourceRequest = AssetManager.LoadAsync(this.ResourcePath, typeof(GameObject)); }
public async Task LoadSessionsAsync(LoadRequest loadRequest) { this.AreSessionsLoading = true; var sessions = await _databaseService.LoadFavoriteSessionsAsync(_conferenceId); this.Sessions = sessions; this.AreSessionsLoading = false; }
public async Task LoadSessionSpeakersAsync(LoadRequest loadRequest) { this.AreSpeakersLoading = true; var sessions = await _databaseService.LoadSpeakersAsync(_sessionId); this.Speakers = sessions; this.AreSpeakersLoading = false; }
public async Task LoadConferencesAsync(LoadRequest loadRequest) { this.IsConferenceLoading = true; var conference = await LoadConferenceFromLocalAsync(); this.Conference = conference; this.IsConferenceLoading = false; }
public async Task LoadConferencesAsync(LoadRequest loadRequest) { this.AreConferencesLoading = true; _currentUser = await _databaseService.LoadCurrentUserAsync (); if (_currentUser != null) { var scheduledConferences = await _databaseService.LoadScheduledConferencesAsync (); if (!scheduledConferences.Any () || loadRequest == LoadRequest.Refresh) { await _databaseService.DeleteAllScheduledConferencesAsync (); var scheduledConferenceDtos = await _conferenceService.LoadScheduledConferencesAsync (_currentUser.UserName); foreach (var scheduledConferenceDto in scheduledConferenceDtos) { var dto = scheduledConferenceDto; var scheduledConference = await TaskEx.Run (() => Mapper.Map<Conference> (dto)); await _databaseService.SaveConferenceAsync (scheduledConference); //foreach (var sessionDto in scheduledConferenceDto.Sessions) //{ // SessionDto dto1 = sessionDto; // var session = await TaskEx.Run(() => Mapper.Map<Session>(dto1)); // session.ConferenceId = scheduledConference.Id; // await _databaseService.SaveSessionAsync(session); //} } scheduledConferences = await _databaseService.LoadScheduledConferencesAsync (); } this.Conferences = scheduledConferences; } this.AreConferencesLoading = false; }
private void Update() { // Check the progress of any active load request. if(_activeLoad != null) { if(_activeLoad.Async.isDone) { Logger.Log("Asyncronous Load Opperation Done.", 1); ActivateScene(_activeLoad); _activeLoad.RunCallback(); _activeLoad = null; } else { Logger.Log("Progress " + _activeLoad.Async.progress, 0); } } // If there is not an active load request. Start the next request in the queue else if(_loadRequests.Count>0) { Logger.Log("Ready to Load Scene. Request List Length = " + _loadRequests.Count, 1); LoadRequest load = _loadRequests.Dequeue(); StartCoroutine(LoadSceneAsync(load)); } }
private void ActivateScene(LoadRequest load) { // By the time the scene is activated, it should have been finished loading and the new scene controller // should have already registered itself with the SceneManager. // Find the registered SceneController, Initialize it and add it to the active scenes Dict. for(int i=0; i<_registeredScenes.Count; i++) { if(load.SceneName == _registeredScenes[i].Name) { SceneController sc = _registeredScenes[i]; Logger.Log("Scene Manager - Activating Scene: " + sc.Name, 1); _activeScenes.Add(sc.Name, sc); sc.gameObject.transform.SetParent(GameParent.transform, false); _registeredScenes.RemoveAt(i); if (!sc.Initialize()) { Logger.Log("New Scene: " + _registeredScenes[i].Name + " Could not be initialized.", 4); return; } return; } } Logger.Log("New Loaded Scene: " + load.SceneName + " is not yet registered.\rIt could be that the scene " + load.SceneName + " does not have a scene controller attached.", 3); }
private void OnLoadCompleted(LoadRequest loadRequest, Image image) { if (LoadCompleted != null) { LoadCompletedEventArgs e = new LoadCompletedEventArgs { FilePath = loadRequest.FilePath, Tag = loadRequest.Tag, Image = image }; LoadCompleted(this, e); } }
public IEnumerator LoadSceneAsync(LoadRequest load) { _activeLoad = load; string name = _activeLoad.SceneName; Logger.Log("Start Loading Scene " + name + " at " + Time.time, 2); _activeLoad.Async = Application.LoadLevelAdditiveAsync(name); yield return _activeLoad.Async; Logger.Log("Finished Loading Scene: " + name + " at " + Time.time, 2); // Opportunity here to run code on complete prior to sceneController start(); // TODO Send Scene Load Complete Signal. }
protected void LoadTerrainImpl( TerrainSlot slot, bool synchronous ) { if ( slot.Instance == null && ( !string.IsNullOrEmpty( slot.Def.FileName ) || slot.Def.ImportData != null ) ) { // Allocate in main thread so no race conditions slot.Instance = new Terrain( this._sceneManager ); slot.Instance.ResourceGroup = this._resourceGroup; // Use shared pool of buffers slot.Instance.GpuBufferAllocator = this.BufferAllocator; var req = new LoadRequest(); req.Slot = slot; req.Origin = this; Root.Instance.WorkQueue.AddRequest( this._workQueueChannel, WORKQUEUE_LOAD_REQUEST, req, 0, synchronous ); } }