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;
32
32
}
33
33
34
34
+ (UImmutablePassport*) getPassport {
35
- UWorld* World = nullptr ;
36
-
37
35
#if WITH_EDITOR
38
36
if (GEditor)
39
37
{
40
38
for (const auto & Context : GEditor->GetWorldContexts ())
41
39
{
42
- if (Context. WorldType == EWorldType::PIE && Context.World ())
40
+ if (auto * World = Context.World ())
43
41
{
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
+ }
46
53
}
47
54
}
48
55
}
@@ -53,23 +60,7 @@ static NSString* _pendingRedirectScheme = nil;
53
60
}
54
61
#endif
55
62
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;
73
64
}
74
65
75
66
- (void )launchUrl:(const char *)url forRedirectUri:(const char *)redirectUri {
You can’t perform that action at this time.
0 commit comments