跳到主要内容

Class Screen

Events

onResolutionChanged

public Action<Vector2Int> onResolutionChanged

Properties

width

public int width { get; }

height

public int height { get; }

renderWidth

public int renderWidth { get; }

renderHeight

public int renderHeight { get; }

aspect

public float aspect { get; }

renderAspect

public float renderAspect { get; }

fixedAspectEnabled

public bool fixedAspectEnabled { get; private set; }

resolution

public Vector2Int resolution { get; }

renderResolution

public Vector2Int renderResolution { get; }

Methods

Vector2 GetResolutionScale(ResolutionScaleMode resolutionScaleMode)

public Vector2 GetResolutionScale(ResolutionScaleMode resolutionScaleMode)

void Refresh()

public void Refresh()

void EnableFixedAspect(float aspect)

public void EnableFixedAspect(float aspect)

void EnableFixedAspect(float aspect, IFixedAspectRenderExecutor fixedAspectRenderExecutor)

public void EnableFixedAspect(float aspect, IFixedAspectRenderExecutor fixedAspectRenderExecutor)

void DisableFixedAspect()

public void DisableFixedAspect()

Vector2 ScreenPointToRenderArea(Vector2 screenPoint)

public Vector2 ScreenPointToRenderArea(Vector2 screenPoint)

Task<RenderTexture> CaptureScreen()

public Task<RenderTexture> CaptureScreen()

Task CaptureScreen(RenderTexture renderTexture)

public Task CaptureScreen(RenderTexture renderTexture)

Task<Texture2D> CaptureScreenAsTexture2D()

public Task<Texture2D> CaptureScreenAsTexture2D()