StaticDefaultValueMetadata<T> Class
Namespace: Stride.CoreAssembly: Stride.Core.dll
Defines default value of a specific PropertyKey as a parameter value.
public class StaticDefaultValueMetadata<T> : DefaultValueMetadata<T>
Type Parameters
Name | Description |
---|---|
T |
Name | Description | |
---|---|---|
Constructors | ||
StaticDefaultValueMetadata(T, Boolean) | Initializes a new instance of the StaticDefaultValueMetadata<T> class. |
|
Properties | ||
KeepValue | Gets a value indicating whether this value is kept. |
|
Methods | ||
GetDefaultValueT(ref PropertyContainer) | Gets the default value of an external property, and specify if this default value should be kept. It could be usefull with properties with default values depending of its container, especially if they are long to generate. An example would be collision data, which should be generated only once. |
Constructors
StaticDefaultValueMetadata(T, Boolean)
Initializes a new instance of the StaticDefaultValueMetadata<T> class.
public StaticDefaultValueMetadata(T defaultValue, bool keepDefaultValue = false)
Parameters
Type | Name | Description |
---|---|---|
T | defaultValue | The default value. |
System.Boolean | keepDefaultValue | if set to |
Properties
KeepValue
Gets a value indicating whether this value is kept.
public override bool KeepValue { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Overrides
| Improve this Doc View SourceMethods
GetDefaultValueT(ref PropertyContainer)
Gets the default value of an external property, and specify if this default value should be kept. It could be usefull with properties with default values depending of its container, especially if they are long to generate. An example would be collision data, which should be generated only once.
public override T GetDefaultValueT(ref PropertyContainer obj)
Parameters
Type | Name | Description |
---|---|---|
PropertyContainer | obj | The property container. |
Returns
Type | Description |
---|---|
T | The default value. |