Skip to content

[FEATURE] [HideSubClass] attribute #68

@Antoshidza

Description

@Antoshidza

Feature destription

There are some cases where I want to select subclasses of ICardActionCommand directly, where I can create ready to use instance from inspector, but sometimes I need to use Config classes which would be selected as subclasses of IConfigurator<T>. I want to suppress in that cases selecting original class from subclass menu. It is possible to remove [Serializable] from it, but there are also cases where [Serializable] is required for some other logic like saving.

// in this example I want my DeferredCardActionCommand to be NOT selectable as subclass of ICardActionCommand
[Serializable]
public readonly struct DeferredCardActionCommand : ICardActionCommand
    {
        [Serializable, AddTypeMenu("Cards/Deferred card action")]
        private class Config : IConfigurator<ICommand>
        {
            // impl
        }
        
        // impl
    }

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions