Pular para o conteúdo
AstraDOCS

Astra.Component

Astra atual · C# · 06 out. 2026Referência de assinaturas

Uma instância de componente endereçada por objeto + instanceId. Componentes repetíveis (colisor, junta, comportamento) têm cada instância endereçável.

Namespace: Astra · Assembly: Astra.Scripting · Tipo: Struct

readonly struct Astra.Component

Uma instância de componente endereçada por objeto + instanceId. Componentes repetíveis (colisor, junta, comportamento) têm cada instância endereçável.

Membro Categoria
Animation Method
CameraFollow Method
Curve Method
DeformableMesh Method
FollowPath Method
GetBool Method
GetEnum Method
GetFloat Method
GetReference Method
GetResource Method
GetResourceByElementId Method
GetSlotEnum Method
GetSlotFloat Method
Invoke Method
Invoke Method
Material Method
Remove Method
RemoveTracked Method
ResourceElementId Method
SetBool Method
SetEnum Method
SetFloat Method
SetReference Method
SetReference Method
SetResource Method
SetResourceByElementId Method
SetSlotEnum Method
SetSlotFloat Method
SetVector2 Method
SetVector3 Method
Timer Method
ToString Method
Enabled Property
InstanceId Property
IsAlive Property
Object Property
TypeId Property

Animation

public Astra.AnimationPlayer Animation()

CameraFollow

public Astra.CameraFollowRig CameraFollow()

Curve

public Astra.CurvePath Curve()

Stable point identities, Bézier handles and world distance sampling.

DeformableMesh

public Astra.DeformableMesh DeformableMesh()

FollowPath

public Astra.PathFollower FollowPath()

Control the real path follower in the current Play world.

GetBool

public bool GetBool(string propertyId)
Parâmetro Tipo Contrato
propertyId string

GetEnum

public uint GetEnum(string propertyId)
Parâmetro Tipo Contrato
propertyId string

GetFloat

public float GetFloat(string propertyId)
Parâmetro Tipo Contrato
propertyId string

GetReference

public Astra.ObjectReference GetReference(string propertyId)
Parâmetro Tipo Contrato
propertyId string

GetResource

public Astra.AssetGuid GetResource(string propertyId, uint slot = 0)
Parâmetro Tipo Contrato
propertyId string
slot uint · Opcional: 0

GetResourceByElementId

public Astra.AssetGuid GetResourceByElementId(string propertyId, ulong elementId)
Parâmetro Tipo Contrato
propertyId string
elementId ulong

GetSlotEnum

public uint GetSlotEnum(string propertyId, uint slot = 0)
Parâmetro Tipo Contrato
propertyId string
slot uint · Opcional: 0

GetSlotFloat

public float GetSlotFloat(string propertyId, uint slot = 0)
Parâmetro Tipo Contrato
propertyId string
slot uint · Opcional: 0

Invoke

public Astra.ComponentValue Invoke(string method, params Astra.ComponentValue[] arguments)

Executa um método declarado pelo tipo do componente no mundo de Play, com os argumentos tipados do descritor nativo. Host sem a família astra.component.operations lança System.NotSupportedException.

Parâmetro Tipo Contrato
method string
arguments Astra.ComponentValue[]

Invoke

public Astra.ComponentValue Invoke(string method, System.ReadOnlySpan<Astra.ComponentValue> arguments)
Parâmetro Tipo Contrato
method string
arguments System.ReadOnlySpan&lt;Astra.ComponentValue&gt;

Material

public Astra.MaterialSlot Material(uint slot = 0)
Parâmetro Tipo Contrato
slot uint · Opcional: 0

Remove

public void Remove()

Remoção aplicada no próximo ponto seguro do mundo.

RemoveTracked

public Astra.WorldOperation RemoveTracked()

ResourceElementId

public ulong ResourceElementId(string propertyId, uint slot)
Parâmetro Tipo Contrato
propertyId string
slot uint

SetBool

public void SetBool(string propertyId, bool value)
Parâmetro Tipo Contrato
propertyId string
value bool

SetEnum

public void SetEnum(string propertyId, uint value)
Parâmetro Tipo Contrato
propertyId string
value uint

SetFloat

public void SetFloat(string propertyId, float value)
Parâmetro Tipo Contrato
propertyId string
value float

SetReference

public void SetReference(string propertyId, Astra.GameObject? value)
Parâmetro Tipo Contrato
propertyId string
value Astra.GameObject?

SetReference

public void SetReference(string propertyId, Astra.ObjectReference value)
Parâmetro Tipo Contrato
propertyId string
value Astra.ObjectReference

SetResource

public void SetResource(string propertyId, Astra.AssetGuid value, uint slot = 0)
Parâmetro Tipo Contrato
propertyId string
value Astra.AssetGuid
slot uint · Opcional: 0

SetResourceByElementId

public void SetResourceByElementId(string propertyId, ulong elementId, Astra.AssetGuid value)
Parâmetro Tipo Contrato
propertyId string
elementId ulong
value Astra.AssetGuid

SetSlotEnum

public void SetSlotEnum(string propertyId, uint value, uint slot = 0)
Parâmetro Tipo Contrato
propertyId string
value uint
slot uint · Opcional: 0

SetSlotFloat

public void SetSlotFloat(string propertyId, float value, uint slot = 0)
Parâmetro Tipo Contrato
propertyId string
value float
slot uint · Opcional: 0

SetVector2

public void SetVector2(string propertyId, System.Numerics.Vector2 value)

Writes the two persisted channels atomically; transport padding is zero.

Parâmetro Tipo Contrato
propertyId string
value System.Numerics.Vector2

SetVector3

public void SetVector3(string propertyId, System.Numerics.Vector3 value)

Valida e publica os três canais refletidos como uma única atribuição.

Parâmetro Tipo Contrato
propertyId string
value System.Numerics.Vector3

Timer

public Astra.Components.GameTimer Timer()

Fachada gerada do schema (Astra.Components.GameTimer).

ToString

public override string ToString()

Enabled

public bool Enabled { get; set; }

Estado local dos tipos que declaram a propriedade enabled no schema. Tipos sem essa capacidade recusam a operação; não desativa o objeto.

InstanceId

public ulong InstanceId { get; }

IsAlive

public bool IsAlive { get; }

Object

public Astra.GameObject Object { get; }

TypeId

public string TypeId { get; }