Sign In Register

How can we help you today?

Start a new topic
Answered

Unity SDK DeviceAuth no ability to set request elements

https://api.gamesparks.net/?csharpsdk#authenticationrequest  implies (when you click on the C# example on the right) that you can set any of the request values (like device id) - but in the latest SDK (Gamesparks_Unity_5.3.5.181 ), you can only set the display name.


Is/was this intentional?  I assume the 'other' values are being automagically assigned (using built in Unity exposed values?) For testing purposes, we like to allow the user to override the device id  value (so they can easily device authenticate to the same user between different devices or even PC/Mac builds).


thanks in advance!



Best Answer

Hi Jeff,


Just pasting the answer in from the ticket for clarification. All of the fields other than .SetSegments and .SetDisplayName in the DeviceAuthenticationRequest in Unity are populated in PlatformBase.cs using the SystemInfo.deviceUniqueIdentifier from Unity. There is no official mechanism for bypassing this, I can see that you have managed to work around it by editing the Platformbase.cs script, for now that is the only way to do it I'm afraid. 


Thanks,

Liam


Hi Jeff,


As per the ticket: looking into this.


Thanks,


Oisin

Thanks - at the moment, I am sorta hijacking things through PlatformBase.cs but an 'official' mechanism would be best!

Sorry - the above link should have been https://api.gamesparks.net/?csharpsdk#deviceauthenticationrequest

Resolved offline in ticket (essentially the current DeviceAuthenticationRequest doesn't support setting any values other than segments of displayName)

Hack of PlatformBase actually does work - (although had to create and expose a public function to override the current 'platform' device id).  


Please mark as Answered!

Answer

Hi Jeff,


Just pasting the answer in from the ticket for clarification. All of the fields other than .SetSegments and .SetDisplayName in the DeviceAuthenticationRequest in Unity are populated in PlatformBase.cs using the SystemInfo.deviceUniqueIdentifier from Unity. There is no official mechanism for bypassing this, I can see that you have managed to work around it by editing the Platformbase.cs script, for now that is the only way to do it I'm afraid. 


Thanks,

Liam


Unfortunately i think this should still be resolved. If you expose it...that would make it even easier to just hack and make a system think it's another system. This should be fixed and it should be possible to use gamesparks servers to do this. With c# being one of the fastest known languages around I'm surprised c# isn't more updated then anything else.

 

Login to post a comment