Pass in Quality settings to web player

Would it be possible (perhaps at a later date) to pass in a quality setting on load (or embedded in the web page) to alter the quality settings of a web player prior to loading up the unity app.

We can store user profile settings, but right now the only way to alter the quality (AA) is to have a few separate apps, and load the one with the corresponding quality.

It would be insanely helpful to pass that value in.

You could use Unity/browser communication to query what quality level you want.

It’s not at load time, but it could be performed before whatever main scene, I’d think.

Cheers,
-Jon

The issue is Anti-Aliasing is determined at startup, prior to any settings, I believe, and cannot be changed at runtime. The only option seems to be having a build for each AA level.

There are only five different levels of anti-aliasing and there are six levels of quality settings. You could have your first loaded script check what AA level you want and change the quality settings to the appropriate level. That script could check an outside source very easily. Does that work for you?

The limitation is that once a web player (or any app, really) sets it’s Anti Aliasing level, you cannot change it without restarting the application.

This means the app, in this case the web player, needs to know it’s appropriate AA level at startup, prior to any scripts being called.

Once I would have called a script to assign the appropriate level, it is already too late. I would need to restart the Unity player, and the process begins again…

I want to know if there is a way to interrupt player startup similar to the standalone app-- or at the very least pass in AA settings before it initializes the GPU.

Ah… I did not know that.

After some experimentation, I figured out that it accepts AA setting changes if you pause a game in the editor.

For example, start a game up in the editor with 0xAA. Through a script turn on AA. Pause the game with the editor. Unpause and the new AA settings are applied.

Anyways, this leads me to believe it should be possible to change AA after a game starts. Unless pausing is in effect equivalent to quitting an app and restarting it to the same state…

You can actually even change them in a build at runtime. However notice the anti-aliasing doesn’t actually change.

It’s pretty easy to test. Make a gui button that changes the quality settings, and look for jaggies. You shouldn’t see any change whatsoever.

If you pause the game after changing the settings in-game, and then unpause, it will update the AA.

Are you doing this in the editor, or in a build in the web player?

In the editor.

To reiterate
0.From the editor…

  1. Start a game with 0xAA.
    2.Click on a GUIButton to change the quality settings to a level with AA.
    3.Click the pause game button in the editor.
    4.Click the pause game button again to unpause the game.
    5.Observe the updated AA status.

I am not saying that there is currently a way to make this useful, but it seems to me that it would be pretty simple to expose to scripting whatever mechanism is used by the editor.

Unless, when you pause/unpause you are actually completely reloading the game.