2

Unity を使用してデスクトップ アプリケーションを開発しており、以前は Unity 4 を使用していました。プロジェクトを Unity 5 (5.2.1) にアップグレードしました。画面解像度の設定に問題があります。Unity 4 で解像度を設定するために使用Screen.SetResolution (Screen.currentResolution.width, Screen.currentResolution.height, true);しましたが、正常に動作しますが、Unity 5 ではScreen.currentResolution.width正しい値が得られません。

これを引き起こす可能性のある Unity 5.2.1 の新機能はありますか?

4

2 に答える 2

2

次のいずれかを探しているようです。

http://docs.unity3d.com/ScriptReference/Screen-width.html http://docs.unity3d.com/ScriptReference/Screen-height.html

または:

http://docs.unity3d.com/ScriptReference/Resolution-width.html http://docs.unity3d.com/ScriptReference/Resolution-height.html

現在の解像度では、プレーヤーがウィンドウ モードで実行されていると認識している場合にのみ、期待どおりの結果が得られる可能性があります。

http://docs.unity3d.com/ScriptReference/Screen-currentResolution.html

于 2016-03-15T01:38:43.667 に答える