File tree Expand file tree Collapse file tree 1 file changed +13
-22
lines changed
Source/Immutable/Private/Immutable/Mac Expand file tree Collapse file tree 1 file changed +13
-22
lines changed Original file line number Diff line number Diff line change @@ -32,17 +32,24 @@ static NSString* _pendingRedirectScheme = nil;
3232}
3333
3434+ (UImmutablePassport*) getPassport {
35- UWorld* World = nullptr ;
36-
3735#if WITH_EDITOR
3836 if (GEditor)
3937 {
4038 for (const auto & Context : GEditor->GetWorldContexts ())
4139 {
42- if (Context. WorldType == EWorldType::PIE && Context.World ())
40+ if (auto * World = Context.World ())
4341 {
44- World = Context.World ();
45- break ;
42+ if (auto GameInstance = World->GetGameInstance ())
43+ {
44+ if (auto ImmutableSubsystem = GameInstance->GetSubsystem <UImmutableSubsystem>())
45+ {
46+ auto WeakPassport = ImmutableSubsystem->GetPassport ();
47+ if (auto Passport = WeakPassport.Get ())
48+ {
49+ return Passport;
50+ }
51+ }
52+ }
4653 }
4754 }
4855 }
@@ -53,23 +60,7 @@ static NSString* _pendingRedirectScheme = nil;
5360 }
5461#endif
5562
56- if (!World) {
57- return nil;
58- }
59-
60- auto ImmutableSubsystem = World->GetGameInstance ()->GetSubsystem <UImmutableSubsystem>();
61-
62- if (!ImmutableSubsystem) {
63- return nil;
64- }
65-
66- auto Passport = ImmutableSubsystem->GetPassport ();
67-
68- if (!Passport.IsValid ()) {
69- return nil;
70- }
71-
72- return Passport.Get ();
63+ return nil;
7364}
7465
7566- (void )launchUrl:(const char *)url forRedirectUri:(const char *)redirectUri {
You can’t perform that action at this time.
0 commit comments