Merge branch 'spawn-scalar' of https://github.com/Tryibion/FlaxEngine into Tryibion-spawn-scalar

This commit is contained in:
Wojtek Figat
2023-11-06 13:36:24 +01:00

View File

@@ -7,6 +7,7 @@ using Real = System.Single;
#endif
using FlaxEngine;
using FlaxEngine.GUI;
namespace FlaxEditor.SceneGraph.Actors
{
@@ -30,6 +31,12 @@ namespace FlaxEditor.SceneGraph.Actors
// Rotate to match the space (GUI uses upper left corner as a root)
Actor.LocalOrientation = Quaternion.Euler(0, -180, -180);
var uiControl = new UIControl
{
Name = "Canvas Scalar",
Control = new CanvasScaler()
};
Root.Spawn(uiControl, Actor);
}
/// <inheritdoc />