Class HierarchicalComponentContainer<TContainer, TComponent>
Base class that stores a set of hierarchical components by type. Other containers can be added as dependencies to get inherited or overridden components.
Inheritance
Implements
Inherited Members
Namespace: Unity.Build
Assembly: solution.dll
Syntax
public abstract class HierarchicalComponentContainer<TContainer, TComponent> : ScriptableObjectPropertyContainer<TContainer>, ISerializationCallbackReceiver where TContainer : HierarchicalComponentContainer<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. |
| AsReadOnly() | Returns a read-only wrapper for this container. |
| ClearComponents() | Remove all components from this container. |
| ClearDependencies() | Remove all dependencies from this container. |
| CreateInstance(TContainer) | Create a new instance using the specified container as a template to copy from. |
| GetComponent(Type) | Get a component value. |
| GetComponentOrDefault(Type) | Get a component value if found, default value otherwise. |
| GetComponentOrDefault<T>() | Get a component value if found, default value otherwise. |
| GetComponentSource(Type, bool) | Get the source container from which the component value is coming from. |
| GetComponentSource<T>(bool) | Get the source container from which the component value is coming from. |
| GetComponentTypes() | Get all component types from all dependencies recursively. |
| GetComponent<T>() | Get a component value. |
| GetComponents() | Get all component values from all dependencies recursively. |
| GetComponents(Type) | Get all component values from all dependencies recursively, that matches specified component type. |
| GetComponents<T>() | Get all component values from all dependencies recursively, that matches specified component type. |
| GetDependencies() | Get all dependencies recursively. |
| HasComponent(Type) | Determine if a component exist in this container or dependencies recursively. |
| HasComponent<T>() | Determine if a component exist in this container or dependencies recursively. |
| HasDependency(TContainer) | Determine if a dependency exist in this container or its dependencies. |
| IsComponentInherited(Type) | Determine if a component is inherited from a dependency. |
| IsComponentInherited<T>() | Determine if a component is inherited from a dependency. |
| IsComponentOverridden(Type) | |
| IsComponentOverridden<T>() | |
| IsComponentOverriding(Type) | Determines if component overrides a dependency. |
| IsComponentOverriding<T>() | Determines if component overrides a dependency. |
| OnComponentConstruct(ref TComponent) | |
| RemoveComponent(Type) | Remove all components that matches the component type. |
| RemoveComponent<T>() | Remove all components that matches the component type. |
| RemoveDependency(TContainer) | Remove a dependency from this container. |
| Reset() | Reset this asset in preparation for deserialization. |
| Sanitize() | Sanitize this asset after deserialization. |
| SetComponent(Type) | Set a component to default value. |
| SetComponent(Type, TComponent) | |
| SetComponent(TComponent) | Set a component to the value specified. |
| SetComponent<T>() | Set a component to default value. |
| SetComponent<T>(T) | Set a component to the value specified. |
| TryGetComponent(Type, out TComponent) | Get a component value. |
| TryGetComponent<T>(out T) | Get a component value. |