Version: 2022.2
言語: 日本語
public void OnInspectorGUI ();

説明

Allows you to add custom GUI controls to the version control settings in the inspector.

using UnityEditor;
using UnityEditor.VersionControl;

[VersionControl("Custom")] public class CustomVersionControlObject : VersionControlObject, ISettingsInspectorExtension { public void OnInspectorGUI() { var oldUsername = EditorUserSettings.GetConfigValue("vcCustomUsername"); var newUsername = EditorGUILayout.TextField("Username:", oldUsername); if (newUsername != oldUsername) EditorUserSettings.SetConfigValue("vcCustomUsername", newUsername); } }