PropertyBag<TContainer>
Base class for implementing a property bag for a specified container type. This is an abstract class.
Read time 1 minuteLast updated 7 days ago
Definition
- Type: Class
- Namespace: Unity.Properties
- Assembly: UnityEngine.PropertiesModule
- Implements: IPropertyBag<T>, IPropertyBag
public abstract class PropertyBag<TContainer> : IPropertyBag<TContainer>, IPropertyBag
Remarks
This is used as the base class internally and should NOT be extended.
When implementing custom property bags use: " ContainerPropertyBag<TContainer>. " IndexedCollectionPropertyBag<TList, TElement>.
Properties
Property | Description |
|---|---|
| InstantiationKind | Implement this property and return true to provide custom type instantiation for the container type. |
Methods
Method | Description |
|---|---|
| Accept | Accepts visitation from a specified ITypeVisitor. |
| CreateInstance | Creates and returns a new instance of TContainer. |
| GetProperties | Implement this method to return a PropertyCollection<TContainer> that can enumerate through all properties for the |
| Instantiate | Implement this method to provide custom type instantiation for the container type. |
| TryCreateInstance | Tries to create a new instance of TContainer. |