I’m trying to set “enable exceptions” in Player Settings → Publishing Settings as part of my build process. I’ve searched for a WebGL specific player settings class but only found classes for the other platforms that expose the capability to set player settings in code. Does anyone know of a way to set these WebGL player settings in code?I’m in Unity 5.3.4 p1.
Cheers
You can always peek into Unity code using C# decompilers (such as DotPeek, Reflector, or even with MonoDevelop)
Here you can see how this value is set:
PlayerSettings.GetPropertyInt("exceptionSupport",13)
I have no idea what the possible values are, but with a bit of experimentation you can find out (these values are saved to your ProjectSettings file, you should be able to see the saved value if you set serialization to “Text only”)
1 Like
Thanks! That’s the value I was looking for. I was trying
PlayerSettings.SetPropertyInt("EnableExceptions", 13);
and a lot of different variations. I took your advice to look through the ProjectSettings.asset file and I found all of the different values you can get/set with PlayerSettings.Get/SetProperty.