diff --git a/Source/Editor/CustomEditors/Editors/ControlReferenceEditor.cs b/Source/Editor/CustomEditors/Editors/ControlReferenceEditor.cs index c93a2aff3..8a0595a0f 100644 --- a/Source/Editor/CustomEditors/Editors/ControlReferenceEditor.cs +++ b/Source/Editor/CustomEditors/Editors/ControlReferenceEditor.cs @@ -18,7 +18,7 @@ namespace FlaxEditor.CustomEditors.Editors; public class UIControlRefPickerControl : Control { private Type _controlType; - public UIControl _value; + private UIControl _value; private ActorTreeNode _linkedTreeNode; private string _valueName; private bool _supportsPickDropDown; diff --git a/Source/Engine/UI/ControlReference.cs b/Source/Engine/UI/ControlReference.cs index b05f73682..a708e48fa 100644 --- a/Source/Engine/UI/ControlReference.cs +++ b/Source/Engine/UI/ControlReference.cs @@ -86,6 +86,17 @@ public struct ControlReference : IControlReference where T : Control _uiControl = null; } + /// + /// The implicit operator for the Control. + /// + /// The ControlReference + /// The Control. public static implicit operator T(ControlReference reference) => reference.Control; + + /// + /// The implicit operator for the UIControl + /// + /// The ControlReference + /// The UIControl. public static implicit operator UIControl(ControlReference reference) => reference.UIControl; }