Struct MaterialParameter
This struct represents a material parameter.
Namespace: Evergine.Framework.Assets.AssetParts
Assembly: Evergine.Framework.dll
Syntax
public struct MaterialParameter
Constructors
MaterialParameter(string, string, byte[])
Initializes a new instance of the MaterialParameter struct.
Declaration
public MaterialParameter(string type, string name, byte[] value)
Parameters
Type | Name | Description |
---|---|---|
string | type | The material parameter string type. |
string | name | The material parameter name. |
byte[] | value | The parameter value. |
Fields
Name
The parameter's name.
Declaration
public string Name
Field Value
Type | Description |
---|---|
string |
Type
The type of material parameter.
Declaration
public string Type
Field Value
Type | Description |
---|---|
string |
ValueByteArray
The value parameter as a byte array.
Declaration
public byte[] ValueByteArray
Field Value
Type | Description |
---|---|
byte[] |
Methods
Read(BinaryReader)
Reads this asset part.
Declaration
public static MaterialParameter Read(BinaryReader reader)
Parameters
Type | Name | Description |
---|---|---|
BinaryReader | reader | The binary reader. |
Returns
Type | Description |
---|---|
MaterialParameter | The loaded asset part. |
ReadType<T>(string, T)
Reads a material parameter.
Declaration
public static MaterialParameter ReadType<T>(string name, T value)
Parameters
Type | Name | Description |
---|---|---|
string | name | The parameter name. |
T | value | The parameter value. |
Returns
Type | Description |
---|---|
MaterialParameter | The material parameter instance. |
Type Parameters
Name | Description |
---|---|
T | The parameter type. |
Write(BinaryWriter)
Writes this asset.
Declaration
public void Write(BinaryWriter writer)
Parameters
Type | Name | Description |
---|---|---|
BinaryWriter | writer | The binary writer. |