View Single Post
05/18/15, 10:42 PM   #12
Atropos
 
Atropos's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 19
Hey all, I was having a problem with a related issue. I have a function in my addon where I want to return the player to the main game scene.

I was using the following:

if SCENE_MANAGER:IsInUIMode() then SCENE_MANAGER:SetInUIMode(false) end
The problem is if a user goes directly to the crown store at the same time it triggers a render error. I'm not sure if it's the BEST approach, but what I discovered was a workaround was to add an extra condition:


if ( SCENE_MANAGER:IsInUIMode() and SCENE_MANAGER.currentScene.name ~= "market" ) then SCENE_MANAGER:SetInUIMode(false) end
Perhaps there is a more reliable way to detect whether the player is viewing a securely rendered scene, but if not I would like to propose the addition of a simple function like IsSecureRender() or something as a quick way to avoid attempting code that we know will fail.
  Reply With Quote