https://metaplay.io logo
Clearing credentials in editor
# questions-and-feedback
s
Hi, ran into a problem where I managed to lock/corrupt my player login credentials that I was using in the Unity Editor. We're using GameConnectionDelegate.SlotOverride to get different accounts for Editor and desktop builds by default. Clearing the credentials in Unity Editor doesn't work in this case properly as the cleared credentials never take the slot into account. My suggestion is for you to change the function in CredentialsStore.cs that clears the credentials to accept the Slot string as a variable like this: /// /// Deletes stored credential for Editor. This requires no SDK init. /// public static void ClearCredentialsInEditor(string slot = "") { ClearLegacyCredentials(); ClearFileCredentials(slot); } Then we can have the control to do our own Editor script to clear whatever slot we're using inside Unity. I have now modified the source code to achieve this, but would be helpful if this made it in to a future release so I don't have to fix it every time we update the SDK in the future!
j
Heya, have you already updated to R34? There's some improvements around this in the editor. For example:
ClearCredentialsInEditor
will now clear all slots. There's also a
ClearFileCredentials(string slot)
but it's currently private. The Editor menus now also have a few slots available by default to use/clear through the editor UI.
s
No we haven't, R33 here! Good if there's already improvements for this in R34, didn't see a mention in the release notes so just wanted to let you know about this. I'll report again if we encounter issues after updating to 34
j
There's some mentions in the "Complete List" but some browsers refuse to search in that if you don't manually expand it. We don't explicitly mention all API changes either. Easy to miss 😄 Let me know if you need further improvements after you update, happy to make that method public or add another to make it easier in the next update https://cdn.discordapp.com/attachments/1426102533084020737/1427217250271756410/image.png?ex=68f00964&is=68eeb7e4&hm=a7133f4ff016cf61ed3f8e03e165fe42c28e31139815552e931fc8b4348d27fd& https://cdn.discordapp.com/attachments/1426102533084020737/1427217250561167360/image.png?ex=68f00964&is=68eeb7e4&hm=0e9a833dc7363c39760dc419ffd0707dec4fd4eb5d195935469aba1da10b054d&