Method AddChannel
| Edit this page View SourceAddChannel<T>(string)
Adds a new empty channel to the grid. Length equals grid count.
Declaration
public GridBuffer<T> AddChannel<T>(string name) where T : unmanaged
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The unique name of the channel. |
Returns
| Type | Description |
|---|---|
| GridBuffer<T> | The newly added channel. |
Type Parameters
| Name | Description |
|---|---|
| T | The unmanaged type of data. |
AddChannel<T>(string, ReadOnlySpan<T>)
Adds a new channel to the grid with initialized data.
Declaration
public GridBuffer<T> AddChannel<T>(string name, ReadOnlySpan<T> data) where T : unmanaged
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The unique name of the channel. |
| ReadOnlySpan<T> | data | The data to initialize. |
Returns
| Type | Description |
|---|---|
| GridBuffer<T> | The newly added channel. |
Type Parameters
| Name | Description |
|---|---|
| T | The unmanaged type of data. |