// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved. using System; using FlaxEditor.Windows; using FlaxEditor.Windows.Assets; using FlaxEngine; namespace FlaxEditor.Content { /// /// A asset proxy object. /// /// public class SceneAnimationProxy : BinaryAssetProxy { /// public override string Name => "Scene Animation"; /// public override EditorWindow Open(Editor editor, ContentItem item) { return new SceneAnimationWindow(editor, item as AssetItem); } /// public override Color AccentColor => Color.FromRGB(0xff5c4a87); /// public override Type AssetType => typeof(SceneAnimation); /// public override bool CanCreate(ContentFolder targetLocation) { return targetLocation.CanHaveAssets; } /// public override void Create(string outputPath, object arg) { if (Editor.CreateAsset(Editor.NewAssetType.SceneAnimation, outputPath)) throw new Exception("Failed to create new asset."); } } }