Add asset open handler system and async open support
Introduced AssetOpenHandlerAttribute for extension-based asset open logic. Implemented async OpenAssetAsync methods in IAssetRegistry and AssetRegistry, using reflection to invoke handlers. Updated ContentBrowser and ViewModel to support async asset opening. Refactored Hierarchy initialization and XAML for clarity. Logger now throws exceptions in DEBUG for errors/asserts. Removed unused code and cleaned up usings.
This commit is contained in:
@@ -19,6 +19,19 @@ public class CustomEditorAttribute : DiscoverableAttributeBase
|
||||
}
|
||||
}
|
||||
|
||||
public class AssetOpenHandlerAttribute : DiscoverableAttributeBase
|
||||
{
|
||||
internal string[] Extensions
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
public AssetOpenHandlerAttribute(params string[] extensions)
|
||||
{
|
||||
Extensions = extensions;
|
||||
}
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Method)]
|
||||
public sealed class ContextMenuItemAttribute : DiscoverableAttributeBase
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user