Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] [HideSubClass] attribute #68

Closed
Antoshidza opened this issue Sep 25, 2024 · 1 comment · Fixed by #72
Closed

[FEATURE] [HideSubClass] attribute #68

Antoshidza opened this issue Sep 25, 2024 · 1 comment · Fixed by #72
Assignees
Labels
enhancement New feature or request

Comments

@Antoshidza
Copy link

Antoshidza commented Sep 25, 2024

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
    }
@Antoshidza Antoshidza added the enhancement New feature or request label Sep 25, 2024
@mackysoft mackysoft linked a pull request Oct 26, 2024 that will close this issue
@mackysoft
Copy link
Owner

HideInTypeMenuAttribute is added in the #72
A new release will be published immediately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants