OnInspectorGUI()
Allows you to add custom GUI controls to the version control settings in the inspector.
Read time 1 minuteLast updated 13 days ago
Definition
- Type: Method
- Namespace: UnityEditor.VersionControl
- Assembly: UnityEditor
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); }}
Additional Resources: ISettingsInspectorExtension, VersionControlObject.