public static void ChangeActiveScreenCap (int screenCapIndex){ if(screenCapIndex >= activeScreenCaps.Count) screenCapIndex = 0; // reset if active SC list is shorter now xARMManager.Config.PreviewSelectedScreenCapIndex = screenCapIndex; // repaint window on next update repaintNextUpdate = true; if(activeScreenCaps.Count > 0){ xARMScreenCap previousScreenCap = selectedScreenCap; selectedScreenCap = activeScreenCaps[screenCapIndex]; // get Ref to selected SC xARMManager.DefaultGameViewResolution = selectedScreenCap.Resolution; // set as new default resolution // change GameView resolution if activated and selection was changed if(xARMManager.Config.GameViewInheritsPreviewSize && !selectedScreenCap.Equals(previousScreenCap)){ // switch Game View resolution via next Update() (doesn't work correctly inside OnGUI) resizeGameViewToNewDefault = true; } } }