It seems more likely that your subsystem will be able to get World->GetGameViewport and setup whatever when necessary, rather than getting the subsystem inside the game viewport… thinking further, is that even the correct interaction for what you need? what if there is no game viewport?
I actually need to go the other way. I don’t think I can reliably do GetWorld()->GetGameViewport() because the subsystem is initialized before my viewport even exists as far as I can tell.
I am trying to cache a pointer to my subsystem inside my game viewport. This is so I can intercept and store specific touch input data in my subsystem for use elsewhere.
I am assigning values to my subsystem on tick from an input function so I was trying to find a place inside the game viewport to do something like MySubsystem = GetWorld()->GetSubsystem<MySubsystem>() as I don’t want to keep assigning the subsystem every tick.
I’m thinking that overriding the Init() function in the game viewport may be a good idea?