RB.DisplayModeSet
Method - Static
Parameters
Returns
bool
True if mode was successfully set, false otherwise.
DescriptionSets display mode to given resolution and pixel style. Note that this sets only the RetroBlit pixel resolution, and does not affect the native window size. To change the native window size you can use the Unity Screen.SetResolution method. Note that the initial display resolution is always set in RB.IRetroBlitGame.QueryHardware. This method cannot be called from within RB.IRetroBlitGame.Render method. Example Vector2i previousNativeRes;
void Update() { var currentNativeRes = new Vector2i(Screen.width, Screen.height);
if (currentNativeRes != previousNativeRes) { RB.DisplayModeSet(new Vector2i(Screen.width / 2, Screen.height / 2)); }
previousNativeRes = new Vector2i(Screen.width, Screen.height); } |
See AlsoRB.DisplaySize RB.PixelStyle RB.IRetroBlitGame.QueryHardware |