gameover.blog.ir
شکل کلی(پروتوتایپ،کله ی تابع) :
public static void SetResolution(int width, int height, bool fullscreen, int preferredRefreshRate = 0);
توضیح:
برای سوئچ بین رزولوشن های مختلف در یونیتی بکار می ره.
widthپهنای صفحه
height ارتفاع صفحه
fullscreen تمام صفحه: اگه true باشه به صورت تمام صفحه روی گوشی،کشیده می شه.مثال 1:
using UnityEngine; using System.Collections; public class ExampleClass : MonoBehaviour { void Example() { Screen.SetResolution(640, 480, true); } }
مثال 2:
using UnityEngine; using System.Collections; public class ExampleClass : MonoBehaviour { void Example() { Screen.SetResolution(640, 480, true, 60); } }
مثال3:
using UnityEngine; using System.Collections; public class ExampleClass : MonoBehaviour { void Example() { Screen.SetResolution(800, 600, false); } }
برچسب:
نویسنده: ایلیا حیدری