File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -4946,6 +4946,22 @@ public static void Ping(Action<LootLockerPingResponse> onComplete)
4946
4946
LootLockerAPIManager . Ping ( onComplete ) ;
4947
4947
}
4948
4948
4949
+ /// <summary>
4950
+ /// Get the Platform the user last used. This can be used to know what login method to prompt.
4951
+ /// </summary>
4952
+ /// <returns>The platform that was last used by the user</returns>
4953
+ public static Platforms GetLastActivePlatform ( )
4954
+ {
4955
+ if ( CurrentPlatform . Get ( ) == Platforms . None )
4956
+ {
4957
+ return ( Platforms ) PlayerPrefs . GetInt ( "LastActivePlatform" ) ;
4958
+ }
4959
+ else
4960
+ {
4961
+ return CurrentPlatform . Get ( ) ;
4962
+ }
4963
+ }
4964
+
4949
4965
4950
4966
#endregion
4951
4967
}
Original file line number Diff line number Diff line change @@ -105,6 +105,7 @@ public static string GetFriendlyString()
105
105
106
106
public static void Set ( Platforms platform )
107
107
{
108
+ PlayerPrefs . SetInt ( "LastActivePlatform" , ( int ) platform ) ;
108
109
current = GetPlatformRepresentation ( platform ) ;
109
110
}
110
111
You can’t perform that action at this time.
0 commit comments