Difference between GameViewportClient, Viewport, ViewportFrame, SceneViewport, ViewportClient

Hello,

I’m trying to do some modifications on the engine source code, and I’m having some trouble understanding the differences between UGameViewportClient, FViewport, FViewportFrame, FSceneViewport, and FViewportClient. There’s very little documentation about each of these, and the source code is rather complex with so many viewports.

For each of these viewports,

  1. What are they each responsible for displaying?
  2. Are they all embedded within one another or something?
  3. SWindow is the actual window that spawns when a game is launched, correct? Following up on the previous question, which is the viewport that gets embedded into it?
  4. What is the architectural hierarchy between them? I’ve taken a look at the classes for each of these, and it seems to me that UGameViewportClient is the highest level, and it is a variable for UEngine. UGameViewportClient contains FViewport and FViewportFrame as variables. FSceneViewport inherits from FViewport and FViewportFrame. FViewport contains FViewportClient as a variable. Is this correct?
  5. Is there an official architecture diagram somewhere?
1 Like

Really good question…