Class AlembicStreamPlayer
This component allows data streaming from Alembic files. It updates children nodes (Meshes, Transforms, Cameras, etc.) to reflect the Alembic data at the given time.
Namespace: UnityEngine.Formats.Alembic.Importer
Syntax
public class AlembicStreamPlayer : MonoBehaviour
Properties
CurrentTime
Get or set the current time relative to the Alembic file time range (scale in seconds). This is clamped between 0 and the alembic time duration.
Declaration
public float CurrentTime { get; set; }
Property Value
Type | Description |
---|---|
Single |
Duration
Get the duration of the Alembic file (in seconds).
Declaration
public float Duration { get; }
Property Value
Type | Description |
---|---|
Single |
EndTime
Get or set the end timestamp of the streaming time window (scale in seconds). This is clamped to the time range of the Alembic source file.
Declaration
public float EndTime { get; set; }
Property Value
Type | Description |
---|---|
Single |
MediaDuration
The duration of the Alembic file (in seconds).
Declaration
public float MediaDuration { get; }
Property Value
Type | Description |
---|---|
Single |
MediaEndTime
The end timestamp of the Alembic file (scale in seconds).
Declaration
public float MediaEndTime { get; }
Property Value
Type | Description |
---|---|
Single |
MediaStartTime
The start timestamp of the Alembic file (scale in seconds).
Declaration
public float MediaStartTime { get; }
Property Value
Type | Description |
---|---|
Single |
PathToAbc
The path to the Alembic asset. When in a standalone build, the returned path is prepended by the streamingAssets path.
Declaration
public string PathToAbc { get; }
Property Value
Type | Description |
---|---|
String |
Settings
The stream import options.
Declaration
public AlembicStreamSettings Settings { get; }
Property Value
Type | Description |
---|---|
AlembicStreamSettings |
StartTime
Get or set the start timestamp of the streaming time window (scale in seconds). This is clamped to the time range of the Alembic source file.
Declaration
public float StartTime { get; set; }
Property Value
Type | Description |
---|---|
Single |
VertexMotionScale
Get or set the scalar multiplier to the Alembic vertex speed (magnification factor for velocity). Default value is 1.
Declaration
public float VertexMotionScale { get; set; }
Property Value
Type | Description |
---|---|
Single |
Methods
LoadFromFile(String)
Loads a different Alembic file.
Declaration
public bool LoadFromFile(string newPath)
Parameters
Type | Name | Description |
---|---|---|
String | newPath | Path to the new file. |
Returns
Type | Description |
---|---|
Boolean | True if the load succeeded, false otherwise. |
UpdateImmediately(Single)
Update the child GameObject's data to the CurrentTime (The regular update happens during the LateUpdate phase).
Declaration
public void UpdateImmediately(float time)
Parameters
Type | Name | Description |
---|---|---|
Single | time | The timestamp to stream from the asset file. |