기술 자료

Unity Engine

Unity Engine

OnInspectorGUI()

Allows you to add custom GUI controls to the version control settings in the inspector.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

void OnInspectorGUI()

Remarks

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); }}