public AnimationGraphPreview(AnimationGraphWindow window)
                : base(true)
            {
                _window = window;

                // Show floor widget
                _showFloorButton               = ViewWidgetShowMenu.AddButton("Floor", OnShowFloorModelClicked);
                _showFloorButton.Icon          = Style.Current.CheckBoxTick;
                _showFloorButton.IndexInParent = 1;

                // Floor model
                _floorModel = new StaticModel
                {
                    Position = new Vector3(0, -25, 0),
                    Scale    = new Vector3(5, 0.5f, 5),
                    Model    = FlaxEngine.Content.LoadAsync <Model>(StringUtils.CombinePaths(Globals.EngineContentFolder, "Editor/Primitives/Cube.flax"))
                };
                Task.AddCustomActor(_floorModel);

                // Enable shadows
                PreviewLight.ShadowsMode     = ShadowsCastingMode.All;
                PreviewLight.CascadeCount    = 2;
                PreviewLight.ShadowsDistance = 1000.0f;
                Task.ViewFlags |= ViewFlags.Shadows;
            }
 public AnimationGraphPreview(AnimationGraphWindow window)
     : base(true)
 {
     _window   = window;
     ShowFloor = true;
 }
Exemple #3
0
 public Preview(AnimationGraphWindow window)
     : base(true)
 {
     _window = window;
 }