Version: 2020.3
言語: 日本語
public GUIStyle horizontalSliderThumb ;

説明

GUI.HorizontalSlider の thumb (つまみ部分)で使用されるスタイル

padding プロパティーは、thumb(つまみ部分)のサイズを決めるのに使用されます。

using UnityEngine;

public class Example : MonoBehaviour { // Modifies only the horizontal slider style of the current GUISkin

float hSliderValue = 0.0f; GUIStyle style;

void OnGUI() { GUI.skin.horizontalSliderThumb = style; hSliderValue = GUILayout.HorizontalSlider(hSliderValue, 0.0f, 10.0f); } }