以下の内容はhttps://baba-s.hatenablog.com/entry/2025/03/06/103034より取得しました。


【Unity】Game ビューの解像度のインデックスを取得する例

概要

const BindingFlags bindingAttrs = BindingFlags.Instance | BindingFlags.Public;

var gameViewType          = Type.GetType( "UnityEditor.GameView,UnityEditor" );
var selectedSizeIndexInfo = gameViewType!.GetProperty( "selectedSizeIndex", bindingAttrs );
var editorWindow          = EditorWindow.GetWindow( gameViewType );
var selectedSizeIndex     = selectedSizeIndexInfo!.GetValue( editorWindow );

Debug.Log( selectedSizeIndex );



以上の内容はhttps://baba-s.hatenablog.com/entry/2025/03/06/103034より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14