docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class FunctionalityIsland

    Contains a collection of functionality providers which can be used to inject functionality on functionality subscribers. Injecting functionality involves calling ConnectSubscriber on providers indicated by IFunctionalitySubscriber<> with the subscriber as an argument, allowing the provider to set itself on the subscriber's provider property which can then be accessed via extension methods defined alongside the subscriber interface

    Inheritance
    object
    Object
    ScriptableObject
    FunctionalityIsland
    Implements
    IProvidesFunctionalityInjection
    IFunctionalityProvider
    Inherited Members
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(string)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, float)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectOfType<T>()
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.XRTools.ModuleLoader
    Assembly: solution.dll
    Syntax
    [CreateAssetMenu(fileName = "Island", menuName = "ModuleLoader/Functionality Island")]
    public class FunctionalityIsland : ScriptableObject, IProvidesFunctionalityInjection, IFunctionalityProvider

    Fields

    Name Description
    InjectFunctionalityProfilerLabel

    Profiler label for InjectFunctionality

    RequireProvidersProfilerLabel

    Profiler label for RequireProviders

    SetupDefaultProvidersProfilerLabel

    Profiler label for SetupDefaultProviders

    Properties

    Name Description
    defaultProviders

    Array of DefaultProviders specified by this island

    providers

    Dictionary of provider instances which are currently loaded on this island, keyed by the provider interface type

    uniqueProviders

    Set of unique providers--the providers dictionary may contain a provider object in more than one slot

    Methods

    Name Description
    ActivateProviderGameObjects()

    Activate all GameObjects backing MonoBehavior providers

    AddProvider(Type, IFunctionalityProvider)

    Add a provider to a specific slot in the providers list

    AddProviders(List<IFunctionalityProvider>)

    Add a list of functionality providers to this island

    CanAddProviderType(Type)

    Return true if the given type of provider can be added to this functionality island If the given type does not implement any provider interfaces which haven't already been added, it cannot be added

    CheckSetup()

    Log a warning if this Functionality Island has not been set up

    ConnectSubscriber(object)

    Called by the FunctionalityIsland containing this provider when injecting functionality on an object

    GetOrCreateProviderInstance(Type, Type)

    Get or create an instance of the given provider type

    GetProviderSelectionOptions(Type)

    Returns the ProviderPriority attribute for a given type, if it exists

    InjectFunctionality(List<object>, List<IFunctionalityProvider>)

    Inject functionality on a list of objects

    InjectFunctionality(List<IFunctionalitySubscriber>, List<IFunctionalityProvider>)

    Inject functionality on a list of subscribers

    InjectFunctionality(GameObject)

    Inject functionality on all components of a GameObject which implement IFunctionalitySubscriber

    InjectFunctionality(Scene)

    Inject functionality on an entire scene, assuming that

    InjectFunctionalityInDefaultProviders(Dictionary<GameObject, GameObject>, List<IFunctionalityProvider>)

    Inject functionality on providers that were created during the RequireDefaultProviders process

    InjectFunctionalitySingle(object)

    Inject functionality on a single object, assuming all providers have been set up.

    InjectPreparedFunctionality(List<object>)

    Inject functionality on a set of objects, assuming that all required providers have been set up.

    InjectPreparedFunctionality(List<IFunctionalitySubscriber>)

    Inject functionality on a set of objects, assuming that all required providers have been setup.

    LoadProvider()

    Called when the provider is loaded into a FunctionalityIsland

    OnBehaviorDestroy()

    Called by ModuleCallbacksBehaviour OnDestroy as early as possible (using a very low Script Execution Order)

    PrepareFunctionalityForSubscriberTypes(HashSet<Type>, List<IFunctionalityProvider>)

    Set up providers for a given set of subscriber types

    PrintStatus()

    Return a string describing what providers have been added to each island. This is useful to debug issues related to functionality injection when the issue occurs during load or when the asset's inspector does not provide helpful information.

    RemoveProviders(List<IFunctionalityProvider>)

    Remove a list of providers from this functionality island

    SetupDefaultProviders(HashSet<Type>, List<IFunctionalityProvider>)

    Set up functionality providers from the list of default providers This allows custom serialized data to be set up on prefabs for providers

    Unload()

    Unload this island and all of its providers

    UnloadProvider()

    Called when the provider is unloaded by the containing FunctionalityIsland

    Extension Methods

    FunctionalityProviderMethods.TryConnectSubscriber<TProvider>(TProvider, object)
    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)