diff --git a/Content/Shaders/GI/DDGI.flax b/Content/Shaders/GI/DDGI.flax
index daaac6317..c8f8eee9d 100644
--- a/Content/Shaders/GI/DDGI.flax
+++ b/Content/Shaders/GI/DDGI.flax
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:da77e6d9cfc596990d6286fe5b3a7976357cccd95cb0e7ed6a3fdcc23695d212
-size 24284
+oid sha256:6b00a1519c9fe2303a05c10ae4061649c4073a3f65a3bd8c2af848cdc7bf5e53
+size 23702
diff --git a/Content/Shaders/GI/GlobalSurfaceAtlas.flax b/Content/Shaders/GI/GlobalSurfaceAtlas.flax
index a90a8c5ab..f74572140 100644
--- a/Content/Shaders/GI/GlobalSurfaceAtlas.flax
+++ b/Content/Shaders/GI/GlobalSurfaceAtlas.flax
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:32bf53278f501fbdcb61ba7da32dd1a37e6f87608401be4a256b9cc9bf687d7f
-size 12952
+oid sha256:8b69d6b93baa29702789073f911dbe784dc65ccd66a43cef837a217959d24d13
+size 12612
diff --git a/Content/Shaders/TAA.flax b/Content/Shaders/TAA.flax
index b57642b07..e9575793e 100644
--- a/Content/Shaders/TAA.flax
+++ b/Content/Shaders/TAA.flax
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:8d22fd7b1f4008b56a9f95e0c6263f8f66a26244bb40437c724344633a4ea4bc
-size 3343
+oid sha256:26cf20668dc0d93fdffa3ea715130b618e9c491e73dc8be779c1d182e73b255b
+size 3257
diff --git a/Content/Shaders/VolumetricFog.flax b/Content/Shaders/VolumetricFog.flax
index 8de7291ce..18eddae16 100644
--- a/Content/Shaders/VolumetricFog.flax
+++ b/Content/Shaders/VolumetricFog.flax
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:d25529ed77efff338892f54c103d007e98102328382497a5bb0ca5b047ef6acb
-size 14255
+oid sha256:72415ba69a685e9a739d1a08d08c6eb9efd3cab31d8cc0c949cb187a9bad19a5
+size 13841
diff --git a/Source/Editor/CustomEditors/Dedicated/ActorEditor.cs b/Source/Editor/CustomEditors/Dedicated/ActorEditor.cs
index 792d3ae4d..75e3fff23 100644
--- a/Source/Editor/CustomEditors/Dedicated/ActorEditor.cs
+++ b/Source/Editor/CustomEditors/Dedicated/ActorEditor.cs
@@ -94,7 +94,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
{
if (actor != null)
group.Panel.TooltipText = Surface.SurfaceUtils.GetVisualScriptTypeDescription(TypeUtils.GetObjectType(actor));
- const float settingsButtonSize = 14;
+ float settingsButtonSize = group.Panel.HeaderHeight;
var settingsButton = new Image
{
TooltipText = "Settings",
diff --git a/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs b/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs
index c7f62bd57..73a43f1bf 100644
--- a/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs
+++ b/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs
@@ -635,22 +635,22 @@ namespace FlaxEditor.CustomEditors.Dedicated
group.Panel.HeaderTextColor = FlaxEngine.GUI.Style.Current.ProgressNormal;
// Add toggle button to the group
+ var headerHeight = group.Panel.HeaderHeight;
var scriptToggle = new CheckBox
{
TooltipText = "If checked, script will be enabled.",
IsScrollable = false,
Checked = script.Enabled,
Parent = group.Panel,
- Size = new Float2(14, 14),
- Bounds = new Rectangle(2, 0, 14, 14),
- BoxSize = 12.0f,
+ Size = new Float2(headerHeight),
+ Bounds = new Rectangle(headerHeight, 0, headerHeight, headerHeight),
+ BoxSize = headerHeight - 4.0f,
Tag = script,
};
scriptToggle.StateChanged += OnScriptToggleCheckChanged;
_scriptToggles[i] = scriptToggle;
// Add drag button to the group
- const float dragIconSize = 14;
var scriptDrag = new ScriptDragIcon(this, script)
{
TooltipText = "Script reference",
@@ -658,21 +658,20 @@ namespace FlaxEditor.CustomEditors.Dedicated
IsScrollable = false,
Color = FlaxEngine.GUI.Style.Current.ForegroundGrey,
Parent = group.Panel,
- Bounds = new Rectangle(scriptToggle.Right, 0.5f, dragIconSize, dragIconSize),
+ Bounds = new Rectangle(scriptToggle.Right, 0.5f, headerHeight, headerHeight),
Margin = new Margin(1),
Brush = new SpriteBrush(Editor.Instance.Icons.DragBar12),
Tag = script,
};
// Add settings button to the group
- const float settingsButtonSize = 14;
var settingsButton = new Image
{
TooltipText = "Settings",
AutoFocus = true,
AnchorPreset = AnchorPresets.TopRight,
Parent = group.Panel,
- Bounds = new Rectangle(group.Panel.Width - settingsButtonSize, 0, settingsButtonSize, settingsButtonSize),
+ Bounds = new Rectangle(group.Panel.Width - headerHeight, 0, headerHeight, headerHeight),
IsScrollable = false,
Color = FlaxEngine.GUI.Style.Current.ForegroundGrey,
Margin = new Margin(1),
@@ -681,7 +680,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
};
settingsButton.Clicked += OnSettingsButtonClicked;
- group.Panel.HeaderTextMargin = new Margin(scriptDrag.Right, 15, 2, 2);
+ group.Panel.HeaderTextMargin = new Margin(scriptDrag.Right - 12, 15, 2, 2);
group.Object(values, editor);
// Scripts arrange bar
diff --git a/Source/Editor/CustomEditors/Elements/Container/GroupElement.cs b/Source/Editor/CustomEditors/Elements/Container/GroupElement.cs
index 674b41d4f..e0ae259ec 100644
--- a/Source/Editor/CustomEditors/Elements/Container/GroupElement.cs
+++ b/Source/Editor/CustomEditors/Elements/Container/GroupElement.cs
@@ -13,7 +13,15 @@ namespace FlaxEditor.CustomEditors.Elements
///
/// The drop panel.
///
- public readonly DropPanel Panel = new DropPanel();
+ public readonly DropPanel Panel = new DropPanel
+ {
+ ArrowImageClosed = new SpriteBrush(Style.Current.ArrowRight),
+ ArrowImageOpened = new SpriteBrush(Style.Current.ArrowDown),
+ EnableDropDownIcon = true,
+ ItemsMargin = new Margin(7, 7, 3, 3),
+ HeaderHeight = 18.0f,
+ EnableContainmentLines = true,
+ };
///
public override ContainerControl ContainerControl => Panel;
diff --git a/Source/Editor/CustomEditors/LayoutElementsContainer.cs b/Source/Editor/CustomEditors/LayoutElementsContainer.cs
index 4829d11fa..936851b15 100644
--- a/Source/Editor/CustomEditors/LayoutElementsContainer.cs
+++ b/Source/Editor/CustomEditors/LayoutElementsContainer.cs
@@ -96,6 +96,7 @@ namespace FlaxEditor.CustomEditors
if (useTransparentHeader)
{
element.Panel.EnableDropDownIcon = true;
+ element.Panel.EnableContainmentLines = false;
element.Panel.HeaderColor = element.Panel.HeaderColorMouseOver = Color.Transparent;
}
OnAddElement(element);
diff --git a/Source/Editor/GUI/Popups/RenamePopup.cs b/Source/Editor/GUI/Popups/RenamePopup.cs
index 83fb05ecf..16fa22648 100644
--- a/Source/Editor/GUI/Popups/RenamePopup.cs
+++ b/Source/Editor/GUI/Popups/RenamePopup.cs
@@ -177,6 +177,7 @@ namespace FlaxEditor.GUI
///
protected override void OnShow()
{
+ _inputField.EndEditOnClick = false; // Ending edit is handled through popup
_inputField.Focus();
_inputField.SelectAll();
diff --git a/Source/Editor/Utilities/QueryFilterHelper.cs b/Source/Editor/Utilities/QueryFilterHelper.cs
index 653149a35..e9e5e9ccb 100644
--- a/Source/Editor/Utilities/QueryFilterHelper.cs
+++ b/Source/Editor/Utilities/QueryFilterHelper.cs
@@ -15,7 +15,7 @@ namespace FlaxEditor.Utilities
///
/// The minimum text match length.
///
- public const int MinLength = 2;
+ public const int MinLength = 1;
///
/// Matches the specified text with the filter.
diff --git a/Source/Editor/Windows/Assets/PrefabWindow.Hierarchy.cs b/Source/Editor/Windows/Assets/PrefabWindow.Hierarchy.cs
index 83063e41d..313a38c47 100644
--- a/Source/Editor/Windows/Assets/PrefabWindow.Hierarchy.cs
+++ b/Source/Editor/Windows/Assets/PrefabWindow.Hierarchy.cs
@@ -253,7 +253,7 @@ namespace FlaxEditor.Windows.Assets
if (actorType.IsAbstract)
continue;
ActorContextMenuAttribute attribute = null;
- foreach (var e in actorType.GetAttributes(true))
+ foreach (var e in actorType.GetAttributes(false))
{
if (e is ActorContextMenuAttribute actorContextMenuAttribute)
{
diff --git a/Source/Editor/Windows/ContentWindow.ContextMenu.cs b/Source/Editor/Windows/ContentWindow.ContextMenu.cs
index cce172478..30b864acc 100644
--- a/Source/Editor/Windows/ContentWindow.ContextMenu.cs
+++ b/Source/Editor/Windows/ContentWindow.ContextMenu.cs
@@ -162,7 +162,7 @@ namespace FlaxEditor.Windows
// Get attribute
ContentContextMenuAttribute attribute = null;
- foreach (var typeAttribute in type.GetAttributes(true))
+ foreach (var typeAttribute in type.GetAttributes(false))
{
if (typeAttribute is ContentContextMenuAttribute contentContextMenuAttribute)
{
diff --git a/Source/Editor/Windows/SceneTreeWindow.ContextMenu.cs b/Source/Editor/Windows/SceneTreeWindow.ContextMenu.cs
index 3a7336bbb..e48e59f80 100644
--- a/Source/Editor/Windows/SceneTreeWindow.ContextMenu.cs
+++ b/Source/Editor/Windows/SceneTreeWindow.ContextMenu.cs
@@ -66,7 +66,7 @@ namespace FlaxEditor.Windows
if (actorType.IsAbstract)
continue;
ActorContextMenuAttribute attribute = null;
- foreach (var e in actorType.GetAttributes(true))
+ foreach (var e in actorType.GetAttributes(false))
{
if (e is ActorContextMenuAttribute actorContextMenuAttribute)
{
@@ -152,11 +152,11 @@ namespace FlaxEditor.Windows
// go through each actor and add it to the context menu if it has the ActorContextMenu attribute
foreach (var actorType in Editor.CodeEditing.Actors.Get())
{
- if (actorType.IsAbstract || !actorType.HasAttribute(typeof(ActorContextMenuAttribute), true))
+ if (actorType.IsAbstract || !actorType.HasAttribute(typeof(ActorContextMenuAttribute), false))
continue;
ActorContextMenuAttribute attribute = null;
- foreach (var actorAttribute in actorType.GetAttributes(true))
+ foreach (var actorAttribute in actorType.GetAttributes(false))
{
if (actorAttribute is ActorContextMenuAttribute actorContextMenuAttribute)
{
diff --git a/Source/Editor/Windows/ToolboxWindow.cs b/Source/Editor/Windows/ToolboxWindow.cs
index 08f4d4eef..3df4d3527 100644
--- a/Source/Editor/Windows/ToolboxWindow.cs
+++ b/Source/Editor/Windows/ToolboxWindow.cs
@@ -250,7 +250,7 @@ namespace FlaxEditor.Windows
foreach (var actorType in Editor.CodeEditing.Actors.Get())
{
ActorToolboxAttribute attribute = null;
- foreach (var e in actorType.GetAttributes(true))
+ foreach (var e in actorType.GetAttributes(false))
{
if (e is ActorToolboxAttribute actorToolboxAttribute)
{
diff --git a/Source/Engine/Physics/Actors/WheeledVehicle.h b/Source/Engine/Physics/Actors/WheeledVehicle.h
index 2cc43bdd7..7e046d1a2 100644
--- a/Source/Engine/Physics/Actors/WheeledVehicle.h
+++ b/Source/Engine/Physics/Actors/WheeledVehicle.h
@@ -10,7 +10,7 @@
/// Representation of the car vehicle that uses wheels. Built on top of the RigidBody with collider representing its chassis shape and wheels.
///
///
-API_CLASS() class FLAXENGINE_API WheeledVehicle : public RigidBody
+API_CLASS(Attributes="ActorContextMenu(\"New/Physics/Wheeled Vehicle\"), ActorToolbox(\"Physics\")") class FLAXENGINE_API WheeledVehicle : public RigidBody
{
friend class PhysicsBackend;
DECLARE_SCENE_OBJECT(WheeledVehicle);
diff --git a/Source/Engine/Physics/Colliders/BoxCollider.h b/Source/Engine/Physics/Colliders/BoxCollider.h
index c69a3ee56..c4ee6c2b5 100644
--- a/Source/Engine/Physics/Colliders/BoxCollider.h
+++ b/Source/Engine/Physics/Colliders/BoxCollider.h
@@ -9,7 +9,7 @@
/// A box-shaped primitive collider.
///
///
-API_CLASS(Attributes="ActorContextMenu(\"New/Physics/Box Collider\"), ActorToolbox(\"Physics\")")
+API_CLASS(Attributes="ActorContextMenu(\"New/Physics/Colliders/Box Collider\"), ActorToolbox(\"Physics\")")
class FLAXENGINE_API BoxCollider : public Collider
{
DECLARE_SCENE_OBJECT(BoxCollider);
diff --git a/Source/Engine/Physics/Colliders/CapsuleCollider.h b/Source/Engine/Physics/Colliders/CapsuleCollider.h
index 2f31e0d3b..5ae53cf53 100644
--- a/Source/Engine/Physics/Colliders/CapsuleCollider.h
+++ b/Source/Engine/Physics/Colliders/CapsuleCollider.h
@@ -10,7 +10,7 @@
///
/// Capsules are cylinders with a half-sphere at each end centered at the origin and extending along the X axis, and two hemispherical ends.
///
-API_CLASS(Attributes="ActorContextMenu(\"New/Physics/Capsule Collider\"), ActorToolbox(\"Physics\")")
+API_CLASS(Attributes="ActorContextMenu(\"New/Physics/Colliders/Capsule Collider\"), ActorToolbox(\"Physics\")")
class FLAXENGINE_API CapsuleCollider : public Collider
{
DECLARE_SCENE_OBJECT(CapsuleCollider);
diff --git a/Source/Engine/Physics/Colliders/MeshCollider.h b/Source/Engine/Physics/Colliders/MeshCollider.h
index f64dd6dd3..a25f4d9c8 100644
--- a/Source/Engine/Physics/Colliders/MeshCollider.h
+++ b/Source/Engine/Physics/Colliders/MeshCollider.h
@@ -10,7 +10,7 @@
/// A collider represented by an arbitrary mesh.
///
///
-API_CLASS(Attributes="ActorContextMenu(\"New/Physics/Mesh Collider\"), ActorToolbox(\"Physics\")")
+API_CLASS(Attributes="ActorContextMenu(\"New/Physics/Colliders/Mesh Collider\"), ActorToolbox(\"Physics\")")
class FLAXENGINE_API MeshCollider : public Collider
{
DECLARE_SCENE_OBJECT(MeshCollider);
diff --git a/Source/Engine/Physics/Colliders/SphereCollider.h b/Source/Engine/Physics/Colliders/SphereCollider.h
index a40d22704..39f6fd63c 100644
--- a/Source/Engine/Physics/Colliders/SphereCollider.h
+++ b/Source/Engine/Physics/Colliders/SphereCollider.h
@@ -8,7 +8,7 @@
/// A sphere-shaped primitive collider.
///
///
-API_CLASS(Attributes="ActorContextMenu(\"New/Physics/Sphere Collider\"), ActorToolbox(\"Physics\")")
+API_CLASS(Attributes="ActorContextMenu(\"New/Physics/Colliders/Sphere Collider\"), ActorToolbox(\"Physics\")")
class FLAXENGINE_API SphereCollider : public Collider
{
DECLARE_SCENE_OBJECT(SphereCollider);
diff --git a/Source/Engine/Physics/Joints/D6Joint.h b/Source/Engine/Physics/Joints/D6Joint.h
index d6f208b33..cd7e194f0 100644
--- a/Source/Engine/Physics/Joints/D6Joint.h
+++ b/Source/Engine/Physics/Joints/D6Joint.h
@@ -160,7 +160,7 @@ public:
/// It also allows you to constrain limits to only specific axes or completely lock specific axes.
///
///
-API_CLASS(Attributes="ActorContextMenu(\"New/Physics/D6 Joint\"), ActorToolbox(\"Physics\")")
+API_CLASS(Attributes="ActorContextMenu(\"New/Physics/Joints/D6 Joint\"), ActorToolbox(\"Physics\")")
class FLAXENGINE_API D6Joint : public Joint
{
DECLARE_SCENE_OBJECT(D6Joint);
diff --git a/Source/Engine/Physics/Joints/DistanceJoint.h b/Source/Engine/Physics/Joints/DistanceJoint.h
index 7ff522a03..96ddc9538 100644
--- a/Source/Engine/Physics/Joints/DistanceJoint.h
+++ b/Source/Engine/Physics/Joints/DistanceJoint.h
@@ -37,7 +37,7 @@ DECLARE_ENUM_OPERATORS(DistanceJointFlag);
/// Physics joint that maintains an upper or lower (or both) bound on the distance between two bodies.
///
///
-API_CLASS(Attributes="ActorContextMenu(\"New/Physics/Distance Joint\"), ActorToolbox(\"Physics\")")
+API_CLASS(Attributes="ActorContextMenu(\"New/Physics/Joints/Distance Joint\"), ActorToolbox(\"Physics\")")
class FLAXENGINE_API DistanceJoint : public Joint
{
DECLARE_SCENE_OBJECT(DistanceJoint);
diff --git a/Source/Engine/Physics/Joints/FixedJoint.h b/Source/Engine/Physics/Joints/FixedJoint.h
index 8020ea73f..c406b4aa8 100644
--- a/Source/Engine/Physics/Joints/FixedJoint.h
+++ b/Source/Engine/Physics/Joints/FixedJoint.h
@@ -8,7 +8,7 @@
/// Physics joint that maintains a fixed distance and orientation between its two attached bodies.
///
///
-API_CLASS(Attributes="ActorContextMenu(\"New/Physics/Fixed Joint\"), ActorToolbox(\"Physics\")")
+API_CLASS(Attributes="ActorContextMenu(\"New/Physics/Joints/Fixed Joint\"), ActorToolbox(\"Physics\")")
class FLAXENGINE_API FixedJoint : public Joint
{
DECLARE_SCENE_OBJECT(FixedJoint);
diff --git a/Source/Engine/Physics/Joints/HingeJoint.h b/Source/Engine/Physics/Joints/HingeJoint.h
index 6c7af54de..a14230cd9 100644
--- a/Source/Engine/Physics/Joints/HingeJoint.h
+++ b/Source/Engine/Physics/Joints/HingeJoint.h
@@ -67,7 +67,7 @@ public:
/// Physics joint that removes all but a single rotation degree of freedom from its two attached bodies (for example a door hinge).
///
///
-API_CLASS(Attributes="ActorContextMenu(\"New/Physics/Hinge Joint\"), ActorToolbox(\"Physics\")")
+API_CLASS(Attributes="ActorContextMenu(\"New/Physics/Joints/Hinge Joint\"), ActorToolbox(\"Physics\")")
class FLAXENGINE_API HingeJoint : public Joint
{
DECLARE_SCENE_OBJECT(HingeJoint);
diff --git a/Source/Engine/Physics/Joints/SliderJoint.h b/Source/Engine/Physics/Joints/SliderJoint.h
index d102c1dd5..51d95f339 100644
--- a/Source/Engine/Physics/Joints/SliderJoint.h
+++ b/Source/Engine/Physics/Joints/SliderJoint.h
@@ -27,7 +27,7 @@ DECLARE_ENUM_OPERATORS(SliderJointFlag);
/// Physics joint that removes all but a single translational degree of freedom. Bodies are allowed to move along a single axis.
///
///
-API_CLASS(Attributes="ActorContextMenu(\"New/Physics/Slider Joint\"), ActorToolbox(\"Physics\")")
+API_CLASS(Attributes="ActorContextMenu(\"New/Physics/Joints/Slider Joint\"), ActorToolbox(\"Physics\")")
class FLAXENGINE_API SliderJoint : public Joint
{
DECLARE_SCENE_OBJECT(SliderJoint);
diff --git a/Source/Engine/Physics/Joints/SphericalJoint.h b/Source/Engine/Physics/Joints/SphericalJoint.h
index 96359d4c5..95f0bae10 100644
--- a/Source/Engine/Physics/Joints/SphericalJoint.h
+++ b/Source/Engine/Physics/Joints/SphericalJoint.h
@@ -29,7 +29,7 @@ DECLARE_ENUM_OPERATORS(SphericalJointFlag);
/// rotate around the anchor points, and their rotation can be limited by an elliptical cone.
///
///
-API_CLASS(Attributes = "ActorContextMenu(\"New/Physics/Spherical Joint\"), ActorToolbox(\"Physics\")")
+API_CLASS(Attributes = "ActorContextMenu(\"New/Physics/Joints/Spherical Joint\"), ActorToolbox(\"Physics\")")
class FLAXENGINE_API SphericalJoint : public Joint
{
DECLARE_SCENE_OBJECT(SphericalJoint);
diff --git a/Source/Engine/UI/GUI/Panels/DropPanel.cs b/Source/Engine/UI/GUI/Panels/DropPanel.cs
index 482460d04..409209549 100644
--- a/Source/Engine/UI/GUI/Panels/DropPanel.cs
+++ b/Source/Engine/UI/GUI/Panels/DropPanel.cs
@@ -131,6 +131,12 @@ namespace FlaxEngine.GUI
[EditorDisplay("Style"), EditorOrder(2000)]
public bool EnableDropDownIcon { get; set; }
+ ///
+ /// Gets or sets a value indicating whether to enable containment line drawing,
+ ///
+ [EditorDisplay("Style"), EditorOrder(2000)]
+ public bool EnableContainmentLines { get; set; } = false;
+
///
/// Occurs when mouse right-clicks over the header.
///
@@ -370,6 +376,16 @@ namespace FlaxEngine.GUI
Render2D.DrawText(HeaderTextFont.GetFont(), HeaderTextMaterial, HeaderText, textRect, textColor, TextAlignment.Near, TextAlignment.Center);
+
+ if (!_isClosed && EnableContainmentLines)
+ {
+ Color lineColor = Style.Current.ForegroundGrey - new Color(0, 0, 0, 100);
+ float lineThickness = 0.05f;
+ Render2D.DrawLine(new Float2(1, HeaderHeight), new Float2(1, Height), lineColor, lineThickness);
+ Render2D.DrawLine(new Float2(1, Height), new Float2(Width, Height), lineColor, lineThickness);
+ Render2D.DrawLine(new Float2(Width, HeaderHeight), new Float2(Width, Height), lineColor, lineThickness);
+ }
+
// Children
DrawChildren();
}
diff --git a/Source/Engine/UI/UICanvas.cpp b/Source/Engine/UI/UICanvas.cpp
index c5384ee5e..22d7ea550 100644
--- a/Source/Engine/UI/UICanvas.cpp
+++ b/Source/Engine/UI/UICanvas.cpp
@@ -17,8 +17,8 @@ MMethod* UICanvas_Serialize = nullptr;
MMethod* UICanvas_SerializeDiff = nullptr;
MMethod* UICanvas_Deserialize = nullptr;
MMethod* UICanvas_PostDeserialize = nullptr;
-MMethod* UICanvas_OnEnable = nullptr;
-MMethod* UICanvas_OnDisable = nullptr;
+MMethod* UICanvas_Enable = nullptr;
+MMethod* UICanvas_Disable = nullptr;
#if USE_EDITOR
MMethod* UICanvas_OnActiveInTreeChanged = nullptr;
#endif
@@ -51,8 +51,8 @@ UICanvas::UICanvas(const SpawnParams& params)
UICanvas_SerializeDiff = mclass->GetMethod("SerializeDiff", 1);
UICanvas_Deserialize = mclass->GetMethod("Deserialize", 1);
UICanvas_PostDeserialize = mclass->GetMethod("PostDeserialize");
- UICanvas_OnEnable = mclass->GetMethod("OnEnable");
- UICanvas_OnDisable = mclass->GetMethod("OnDisable");
+ UICanvas_Enable = mclass->GetMethod("Enable");
+ UICanvas_Disable = mclass->GetMethod("Disable");
#if USE_EDITOR
UICanvas_OnActiveInTreeChanged = mclass->GetMethod("OnActiveInTreeChanged");
#endif
@@ -163,7 +163,7 @@ void UICanvas::OnParentChanged()
void UICanvas::OnEnable()
{
- UICANVAS_INVOKE(OnEnable);
+ UICANVAS_INVOKE(Enable);
// Base
Actor::OnEnable();
@@ -174,7 +174,7 @@ void UICanvas::OnDisable()
// Base
Actor::OnDisable();
- UICANVAS_INVOKE(OnDisable);
+ UICANVAS_INVOKE(Disable);
}
void UICanvas::OnTransformChanged()
diff --git a/Source/Engine/UI/UICanvas.cs b/Source/Engine/UI/UICanvas.cs
index f200ce3d0..87fc9506f 100644
--- a/Source/Engine/UI/UICanvas.cs
+++ b/Source/Engine/UI/UICanvas.cs
@@ -763,7 +763,7 @@ namespace FlaxEngine
#endif
}
- internal void OnEnable()
+ internal void Enable()
{
#if FLAX_EDITOR
if (_editorRoot != null)
@@ -792,7 +792,7 @@ namespace FlaxEngine
}
}
- internal void OnDisable()
+ internal void Disable()
{
_guiRoot.Parent = null;