docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ComponentContainer<TContainer, TComponent>

    Base class that stores a set of hierarchical components by type. Other TContainer can be added as dependencies to get inherited or overridden components.

    Inheritance
    object
    Object
    ScriptableObject
    ScriptableObjectPropertyContainer<TContainer>
    ComponentContainer<TContainer, TComponent>
    BuildSettings
    Implements
    ISerializationCallbackReceiver
    Inherited Members
    ScriptableObjectPropertyContainer<TContainer>.JsonVisitorRegistration
    ScriptableObjectPropertyContainer<TContainer>.AssetChanged
    ScriptableObjectPropertyContainer<TContainer>.CreateInstance(Action<TContainer>)
    ScriptableObjectPropertyContainer<TContainer>.CreateAsset(string, Action<TContainer>)
    ScriptableObjectPropertyContainer<TContainer>.LoadAsset(string)
    ScriptableObjectPropertyContainer<TContainer>.LoadAsset(GUID)
    ScriptableObjectPropertyContainer<TContainer>.SaveAsset(string)
    ScriptableObjectPropertyContainer<TContainer>.RestoreAsset()
    ScriptableObjectPropertyContainer<TContainer>.SerializeToJson()
    ScriptableObjectPropertyContainer<TContainer>.DeserializeFromJson(TContainer, string)
    ScriptableObjectPropertyContainer<TContainer>.SerializeToPath(string)
    ScriptableObjectPropertyContainer<TContainer>.DeserializeFromPath(TContainer, string)
    ScriptableObjectPropertyContainer<TContainer>.SerializeToStream(Stream)
    ScriptableObjectPropertyContainer<TContainer>.DeserializeFromStream(TContainer, Stream)
    ScriptableObjectPropertyContainer<TContainer>.OnBeforeSerialize()
    ScriptableObjectPropertyContainer<TContainer>.OnAfterDeserialize()
    ScriptableObjectPropertyContainer<TContainer>.OnEnable()
    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.Build
    Assembly: solution.dll
    Syntax
    public class ComponentContainer<TContainer, TComponent> : ScriptableObjectPropertyContainer<TContainer>, ISerializationCallbackReceiver where TContainer : ComponentContainer<TContainer, TComponent>
    Type Parameters
    Name Description
    TContainer

    Type of the component container.

    TComponent

    Components base type.

    Methods

    Name Description
    AddDependency(TContainer)

    Add a dependency to this container. Circular dependencies or dependencies on self are not allowed.

    ClearComponents()

    Remove all components from this container.

    ClearDependencies()

    Remove all dependencies from this container.

    GetComponent(Type)

    Get the value of a Type component.

    GetComponent<T>()

    Get the value of a T component.

    GetComponents()

    Get a flatten list of all components recursively from this container and its dependencies.

    GetComponents(Type)

    Get a flatten list of all components recursively from this container and its dependencies, that matches Type.

    GetComponents<T>()

    Get a flatten list of all components recursively from this container and its dependencies, that matches T.

    GetDependencies()

    Get a flatten list of all dependencies recursively from this container and its dependencies.

    HasComponent(Type)

    Determine if a Type component is stored in this container or its dependencies.

    HasComponent<T>()

    Determine if a T component is stored in this container or its dependencies.

    HasDependency(TContainer)

    Determine if a dependency exist in this container or its dependencies.

    IsComponentInherited(Type)

    Determine if a Type component is inherited from a dependency.

    IsComponentInherited<T>()

    Determine if a T component is inherited from a dependency.

    IsComponentOverridden(Type)

    Determine if a Type component overrides a dependency.

    IsComponentOverridden<T>()

    Determine if a T component overrides a dependency.

    RemoveComponent(Type)

    Remove a Type component from this container.

    RemoveComponent<T>()

    Remove all T components from this container.

    RemoveDependency(TContainer)

    Remove a dependency from this container.

    Reset()

    Reset this asset in preparation for deserialization.

    Sanitize()

    Sanitize this asset after deserialization.

    SetComponent(Type, TComponent)

    Set the value of a Type component on this container.

    SetComponent<T>(T)

    Set the value of a T component on this container.

    TryGetComponent(Type, out TComponent)

    Try to get the value of a Type component.

    TryGetComponent<T>(out T)

    Try to get the value of a T component.

    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)