docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method TryConnectSubscriber

    TryConnectSubscriber<TProvider>(TProvider, object)

    Use pattern matching cast to try converting a given object to IFunctionalitySubscriber>TProvider< If the cast succeeds, set the object's provider property to this object Make sure to use the same generic argument that is used in IFunctionalitySubscriber, not an extension of that type

    Declaration
    public static void TryConnectSubscriber<TProvider>(this TProvider provider, object obj) where TProvider : IFunctionalityProvider
    Parameters
    Type Name Description
    TProvider provider

    Provider to try to connect to the subscriber

    object obj

    An object which should be connected to the provider, if it implements the matching subscriber interface

    Type Parameters
    Name Description
    TProvider

    The provider type we are connecting

    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)