Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SteamVR_LoadLevel.cs overlay sorting issue #41

Closed
Blosserdw opened this issue Jun 26, 2017 · 2 comments
Closed

SteamVR_LoadLevel.cs overlay sorting issue #41

Blosserdw opened this issue Jun 26, 2017 · 2 comments

Comments

@Blosserdw
Copy link

Problem:
In the SteamVR_LoadLevel.cs script, the loadingScreen texture overlay seems to always sort over top of the progressBarEmpty/progressBarFull texture overlay. I do see the progress image fade in, then fade out immediately after. Loading takes place then, when the scene is loaded, it shows up again for a split second before I'm dumped into the loaded scene.

My Solution:
I solved this by writing
overlay.SetOverlaySortOrder(handle, orderNum);
in the GetOverlayHandle() function next to where it's setting the alpha, incrementing the orderNum so each call would put the subsequent overlays on top of the one before it. Seems to show up fine after adding that.

Here are the properties I've set up on the script in case it somehow turns out that I'm the source of my own problem :)
Screenshot

Hope that helps!

@aleiby
Copy link
Contributor

aleiby commented Jun 28, 2017

Overlays should be sorted by position. Is that not working? Or do you have them co-located?

@Blosserdw
Copy link
Author

I did not set transforms for them in the inspector, so they both default to the same location (script object's transform).

The script says that setting the transforms for these overlays is optional, which is why I figured it was an issue that they weren't displaying properly when they're at the same location. Although maybe that's just due to my misunderstanding of how the overlays work.

// Optional overrides for where to display loading screen and progress bar overlays.
// Otherwise defaults to using this object's transform.
public Transform loadingScreenTransform, progressBarTransform;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants