Struct ReadOnlyNativeStridedArray<T>
Read-only view into a buffer whose elements are spaced by a byte stride, as glTF's interleaved vertex data is.
Inherited Members
Namespace: Unity.Cloud.Gltfast
Assembly: Unity.Cloud.Gltfast.dll
Syntax
[NativeContainer]
[NativeContainerIsReadOnly]
public struct ReadOnlyNativeStridedArray<T> where T : unmanaged
Type Parameters
| Name | Description |
|---|---|
| T | Element type |
Remarks
Instances are obtained from the import API and stay valid for as long as the memory they view does. They can be used as fields in Burst compiled jobs.
Properties
ByteStride
Byte distance between the starts of two consecutive elements.
Declaration
public int ByteStride { get; }
Property Value
| Type | Description |
|---|---|
| int |
IsCreated
True if this instance views memory. False for a default-initialized instance.
Declaration
public bool IsCreated { get; }
Property Value
| Type | Description |
|---|---|
| bool |
this[int]
Reads the element at index.
Declaration
public T this[int index] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | Zero-based element index. |
Property Value
| Type | Description |
|---|---|
| T | The element at |
Exceptions
| Type | Condition |
|---|---|
| IndexOutOfRangeException |
|
| ObjectDisposedException | The viewed memory was released. |
Length
Number of elements.
Declaration
public int Length { get; }
Property Value
| Type | Description |
|---|---|
| int |