From ad7f5cf72048629453ad65657b68b1ced3acbdd5 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Thu, 29 Jul 2021 19:51:30 +0200 Subject: [PATCH] Add support for object and enum properties in Anim Graph --- .../Windows/Assets/AnimationGraphWindow.cs | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/Source/Editor/Windows/Assets/AnimationGraphWindow.cs b/Source/Editor/Windows/Assets/AnimationGraphWindow.cs index c4d4983d3..f4a2ef8b9 100644 --- a/Source/Editor/Windows/Assets/AnimationGraphWindow.cs +++ b/Source/Editor/Windows/Assets/AnimationGraphWindow.cs @@ -31,21 +31,6 @@ namespace FlaxEditor.Windows.Assets { internal static Guid BaseModelId = new Guid(1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - private readonly ScriptType[] _newParameterTypes = - { - new ScriptType(typeof(float)), - new ScriptType(typeof(bool)), - new ScriptType(typeof(int)), - new ScriptType(typeof(string)), - new ScriptType(typeof(Vector2)), - new ScriptType(typeof(Vector3)), - new ScriptType(typeof(Vector4)), - new ScriptType(typeof(Color)), - new ScriptType(typeof(Quaternion)), - new ScriptType(typeof(Transform)), - new ScriptType(typeof(Matrix)), - }; - private sealed class AnimationGraphPreview : AnimationPreview { private readonly AnimationGraphWindow _window; @@ -290,7 +275,7 @@ namespace FlaxEditor.Windows.Assets } /// - public override IEnumerable NewParameterTypes => _newParameterTypes; + public override IEnumerable NewParameterTypes => Editor.CodeEditing.VisualScriptPropertyTypes.Get(); /// public override void SetParameter(int index, object value)