File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -172,6 +172,33 @@ public static void StartGuestSession(Action<LootLockerGuestSessionResponse> onCo
172
172
} ) ;
173
173
}
174
174
175
+ public static void StartGuestSession ( string identifier , Action < LootLockerGuestSessionResponse > onComplete )
176
+ {
177
+ if ( ! CheckInitialized ( ) )
178
+ {
179
+ onComplete ? . Invoke ( LootLockerResponseFactory . SDKNotInitializedError < LootLockerGuestSessionResponse > ( ) ) ;
180
+ return ;
181
+ }
182
+
183
+ if ( identifier . Length == 0 )
184
+ {
185
+ onComplete ? . Invoke ( LootLockerResponseFactory . Error < LootLockerGuestSessionResponse > ( "identifier cannot be empty" ) ) ;
186
+ return ;
187
+ }
188
+
189
+ LootLockerSessionRequest sessionRequest = new LootLockerSessionRequest ( identifier ) ;
190
+
191
+ LootLockerAPIManager . GuestSession ( sessionRequest , response =>
192
+ {
193
+ CurrentPlatform = "guest" ;
194
+
195
+ PlayerPrefs . SetString ( "LootLockerGuestPlayerID" , response . player_identifier ) ;
196
+ PlayerPrefs . Save ( ) ;
197
+
198
+ onComplete ( response ) ;
199
+ } ) ;
200
+ }
201
+
175
202
public static void StartSteamSession ( string steamId64 , Action < LootLockerSessionResponse > onComplete )
176
203
{
177
204
if ( ! CheckInitialized ( ) )
You can’t perform that action at this time.
0 commit comments