anchan828 / unity-GameViewSizeHelper

ScriptからGameViewSizeを作成、また設定するヘルパークラス

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GameViewSizeHelper

ScriptからGameViewSizeを作成、また設定するヘルパークラス

API

AddCustomSize

GameViewサイズを追加します

public static void AddCustomSize (GameViewSizeGroupType groupType, GameViewSize gameViewSize)
public static void AddCustomSize (GameViewSizeGroupType groupType, GameViewSizeType type, int width, int height, string baseText)
名前 説明
groupType 追加したいプラットフォーム
gameViewSize サイズやアスペクト比など必要な情報を格納したGameViewSizeオブジェクト
type アスペクト比かピクセルサイズか
width
height 高さ
baseText この設定の名前

RemoveCustomSize

GameViewサイズを削除します

public static bool RemoveCustomSize (GameViewSizeGroupType groupType, GameViewSize gameViewSize)
public static bool RemoveCustomSize (GameViewSizeGroupType groupType, GameViewSizeType type, int width, int height, string baseText)

Contains

設定しようとしているGameViewサイズが既に設定済みか確認します

public static bool Contains (GameViewSizeGroupType groupType, GameViewSize gameViewSize)
public static bool Contains (GameViewSizeGroupType groupType, GameViewSizeType type, int width, int height, string baseText)

ChangeGameViewSize

指定のGameViewサイズに変更します
必ずUnityEditorをgroupTypeと同じプラットフォームに指定しておかなければいけません

public static void ChangeGameViewSize (GameViewSizeGroupType groupType, GameViewSize gameViewSize)
public static void ChangeGameViewSize (GameViewSizeGroupType groupType, GameViewSizeType type, int width, int height, string baseText)

LICENSE

MIT

About

ScriptからGameViewSizeを作成、また設定するヘルパークラス

License:MIT License


Languages

Language:C# 100.0%