You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use Rich Presence in an OnDisable() to clear a text when a scene is unloaded. For a reason I cannot figure out, this causes SteamManager to throw the error for double initialization.
a) Am I safe to just comment out that error? I considered it a warning for bad coding style but I followed the recommendation there, which
b) might be outdated, as only using OnDisable() seems to no longer be sufficient.
This is in Unity 2021.3.39f1. SteamManager creates its GameObject and Component itself in the scene in question. I use the Enter Play Mode options with both reloads turned off.
The text was updated successfully, but these errors were encountered:
SteamManager.cs is really more of an example script
You would typically be best to author your own script to handle initialization and running callbacks
For example, if you want to use Steam Input you would also want to RunInput, you might want to fetch leaderboard IDs, etc. all in that same process.
For our toolkit (built on top of Steamworks.NET) we don't actually like to use a MonoBehaivour to run callback or input at all rather we use a background worker. This eliminates quite a few issues including the problem of it being a GameObject in a scene that needs to be persisted.
I use Rich Presence in an
OnDisable()
to clear a text when a scene is unloaded. For a reason I cannot figure out, this causes SteamManager to throw the error for double initialization.a) Am I safe to just comment out that error? I considered it a warning for bad coding style but I followed the recommendation there, which
b) might be outdated, as only using
OnDisable()
seems to no longer be sufficient.This is in Unity 2021.3.39f1. SteamManager creates its GameObject and Component itself in the scene in question. I use the Enter Play Mode options with both reloads turned off.
The text was updated successfully, but these errors were encountered: