Fix code warnings.

This commit is contained in:
Chandler Cox
2024-12-30 18:59:45 -06:00
parent 711fc80d8c
commit c79cd82fd4
2 changed files with 12 additions and 1 deletions

View File

@@ -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;

View File

@@ -86,6 +86,17 @@ public struct ControlReference<T> : IControlReference where T : Control
_uiControl = null;
}
/// <summary>
/// The implicit operator for the Control.
/// </summary>
/// <param name="reference">The ControlReference</param>
/// <returns>The Control.</returns>
public static implicit operator T(ControlReference<T> reference) => reference.Control;
/// <summary>
/// The implicit operator for the UIControl
/// </summary>
/// <param name="reference">The ControlReference</param>
/// <returns>The UIControl.</returns>
public static implicit operator UIControl(ControlReference<T> reference) => reference.UIControl;
}