public void PushCockpit(ICockpitInitializer initializer) { Cockpit trackingInitializer = null; if (activeCockpit != null) { trackingInitializer = activeCockpit; inputBehaviors.Remove(activeCockpit.InputBehaviors); overrideBehaviors.Remove(activeCockpit.OverrideBehaviors); cockpitStack.Push(activeCockpit); activeCockpit.RootGameObject.SetActive(false); } Cockpit c = new Cockpit(this); activeCockpit = c; if (Use2DCockpit) { c.UIElementLayer = FPlatform.UILayer; } c.Start(initializer); if (trackingInitializer != null) { c.InitializeTracking(trackingInitializer); } inputBehaviors.Add(c.InputBehaviors); overrideBehaviors.Add(c.OverrideBehaviors); mouseCursor.ResetCursorToCenter(); }