// Copyright (c) Wojciech Figat. All rights reserved. using System; using FlaxEditor.Windows; using FlaxEditor.Windows.Assets; using FlaxEngine; namespace FlaxEditor.Content { /// /// A asset proxy object. /// /// [ContentContextMenu("New/Animation/Animation Graph Function")] public class AnimationGraphFunctionProxy : BinaryAssetProxy { /// public override string Name => "Animation Graph Function"; /// public override EditorWindow Open(Editor editor, ContentItem item) { return new AnimationGraphFunctionWindow(editor, item as AssetItem); } /// public override Color AccentColor => Color.FromRGB(0x991597); /// public override Type AssetType => typeof(AnimationGraphFunction); /// public override bool CanCreate(ContentFolder targetLocation) { return targetLocation.CanHaveAssets; } /// public override void Create(string outputPath, object arg) { if (Editor.CreateAsset("AnimationGraphFunction", outputPath)) throw new Exception("Failed to create new asset."); } } }