docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method RegisterNewRule

    RegisterNewRule<TRule>()

    Method used to register any custom AnalyzeRules with the AnalyzeSystem. This replaces calling into the AnalyzeWindow directly to remove logic from the GUI. The recommended pattern is to create your rules like so:

    class MyRule : AnalyzeRule {}
    [InitializeOnLoad]
    class RegisterMyRule
    {
        static RegisterMyRule()
        {
            AnalyzeSystem.RegisterNewRule<MyRule>();
        }
    }
    Declaration
    public static void RegisterNewRule<TRule>() where TRule : AnalyzeRule, new()
    Type Parameters
    Name Description
    TRule

    The rule type.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)