Class GameObjectSceneInstance
Descriptor of a glTF scene instance
Inherited Members
Namespace: GLTFast
Assembly: glTFast.dll
Syntax
public class GameObjectSceneInstance
Properties
Cameras
List of instantiated cameras
Declaration
public IReadOnlyList<Camera> Cameras { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<Camera> |
LegacyAnimation
Animation component. Is null if scene has no animation clips. Only available if the built-in Animation module is enabled.
Declaration
public Animation LegacyAnimation { get; }
Property Value
| Type | Description |
|---|---|
| Animation |
Lights
List of instantiated lights
Declaration
public IReadOnlyList<Light> Lights { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<Light> |
MaterialsVariantsControl
Enables controlling and applying materials variants.
Declaration
public MaterialsVariantsControl MaterialsVariantsControl { get; }
Property Value
| Type | Description |
|---|---|
| MaterialsVariantsControl |
Playable
Playables support has been removed since it was not usable in builds. Use LegacyAnimation instead. See: UseCaseCustomPlayablesAnimation
Declaration
[Obsolete("Playables support has been removed since it was not usable in builds. Use LegacyAnimation instead. See: <a href=\"https://docs.unity3d.com/Packages/com.unity.cloud.gltfast@6.13/manual/UseCaseCustomPlayablesAnimation.html\">UseCaseCustomPlayablesAnimation</a>")]
public Playable? Playable { get; }
Property Value
| Type | Description |
|---|---|
| Playable? |
Methods
AddCamera(Camera)
Adds a camera
Declaration
public void AddCamera(Camera camera)
Parameters
| Type | Name | Description |
|---|---|---|
| Camera | camera | Camera to be added |
AddLight(Light)
Adds a light.
Declaration
public void AddLight(Light light)
Parameters
| Type | Name | Description |
|---|---|---|
| Light | light | Light to be added. |
SetLegacyAnimation(Animation)
Sets the LegacyAnimation. Use this from your custom IInstantiator implementation.
Declaration
public void SetLegacyAnimation(Animation animation)
Parameters
| Type | Name | Description |
|---|---|---|
| Animation | animation | Animation component. |