Version: 2021.1
언어: 한국어
public static ShadowQuality shadows ;

설명

Realtime Shadows type to be used.

This determines which type of shadows should be used. The available options are Hard and Soft Shadows, Hard Shadows Only and Disable Shadows.

See Also: QualitySettings.shadows, Light.shadows.

using UnityEngine;

// Let the shadow quality be selected

public class ExampleScript : MonoBehaviour { private int selection = 0; private string[] itemName = {" Disable ", " HardOnly ", " Hard and Soft "};

void Start() { QualitySettings.shadows = ShadowQuality.All; }

void OnGUI() { GUILayout.BeginVertical("Box"); selection = GUILayout.SelectionGrid(selection, itemName, 1, GUILayout.MinWidth(200), GUILayout.MinHeight(100)); GUILayout.EndVertical();

switch (selection) { case 0: QualitySettings.shadows = ShadowQuality.Disable; break; case 1: QualitySettings.shadows = ShadowQuality.HardOnly; break; default: QualitySettings.shadows = ShadowQuality.All; break; } } }
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961