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 @@ -31,17 +31,24 @@ static NSString* _pendingRedirectScheme = nil;
31
31
}
32
32
33
33
+ (UImmutablePassport*) getPassport {
34
- UWorld* World = nullptr ;
35
-
36
34
#if WITH_EDITOR
37
35
if (GEditor)
38
36
{
39
37
for (const auto & Context : GEditor->GetWorldContexts ())
40
38
{
41
- if (Context. WorldType == EWorldType::PIE && Context.World ())
39
+ if (auto * World = Context.World ())
42
40
{
43
- World = Context.World ();
44
- break ;
41
+ if (auto GameInstance = World->GetGameInstance ())
42
+ {
43
+ if (auto ImmutableSubsystem = GameInstance->GetSubsystem <UImmutableSubsystem>())
44
+ {
45
+ auto WeakPassport = ImmutableSubsystem->GetPassport ();
46
+ if (auto Passport = WeakPassport.Get ())
47
+ {
48
+ return Passport;
49
+ }
50
+ }
51
+ }
45
52
}
46
53
}
47
54
}
@@ -52,23 +59,7 @@ static NSString* _pendingRedirectScheme = nil;
52
59
}
53
60
#endif
54
61
55
- if (!World) {
56
- return nil;
57
- }
58
-
59
- auto ImmutableSubsystem = World->GetGameInstance ()->GetSubsystem <UImmutableSubsystem>();
60
-
61
- if (!ImmutableSubsystem) {
62
- return nil;
63
- }
64
-
65
- auto Passport = ImmutableSubsystem->GetPassport ();
66
-
67
- if (!Passport.IsValid ()) {
68
- return nil;
69
- }
70
-
71
- return Passport.Get ();
62
+ return nil;
72
63
}
73
64
74
65
- (void )launchUrl:(const char *)url forRedirectUri:(const char *)redirectUri {
You can’t perform that action at this time.
0 commit comments