Skip to main content

ComponentAsset

Enum ComponentAsset 

Source
pub enum ComponentAsset {
Show 77 variants Window(Window), GraphicsConfig(GraphicsConfig), Shader(Shader), Camera3D(Camera3D), FrameInput(FrameInput), Prop(Prop), RigidBody(RigidBody), PropBody(PropBody), Room(Room), DirectionalLight(DirectionalLight), PointLight(PointLight), SpotLight(SpotLight), RectAreaLight(RectAreaLight), ProceduralMesh(ProceduralMesh), Model(Model), Scene(Scene), TextLabel(TextLabel), HitRegion(HitRegion), File(File), BlockType(BlockType), VoxelChunk(VoxelChunk), InstancedProp(InstancedProp), PostProcessConfig(PostProcessConfig), Animation(Animation), SkeletonPose(SkeletonPose), StreamingConfig(StreamingConfig), VoxelWorld(VoxelWorld), AudioEmitter(AudioEmitter), Sprite(Sprite), KeyBinding(KeyBinding), Screen(Screen), Decal(Decal), VolumetricFog(VolumetricFog), PhysicsJoint(PhysicsJoint), ParticleEmitter(ParticleEmitter), WaterSurface(WaterSurface), SdfVolume(SdfVolume), GlassPanel(GlassPanel), LayoutContainer(LayoutContainer), PhysicsConfig(PhysicsConfig), FpsCounter(FpsCounter), StatHud(StatHud), ScrollPanel(ScrollPanel), ReflectionProbe(ReflectionProbe), Transform(Transform), PropInstance(PropInstance), MeshRenderer(MeshRenderer), ModelRenderer(ModelRenderer), Collider(Collider), BodyDynamics(BodyDynamics), Interactable(Interactable), Pickup(Pickup), Parent(Parent), Children(Children), SceneMember(SceneMember), GlobalTransform(GlobalTransform), RenderHandle(RenderHandle), Held(Held), Lifetime(Lifetime), Spawner(Spawner), DebugHud(DebugHud), AudioCue(AudioCue), Story(Story), AppConfig(AppConfig), AnimationGraph(AnimationGraph), AnimationParams(AnimationParams), CharacterRig(CharacterRig), GroundProbes(GroundProbes), CameraProbe(CameraProbe), TextInput(TextInput), Behavior(Behavior), Variables(Variables), TriggerVolume(TriggerVolume), Hidden(Hidden), LoadingOverlay(LoadingOverlay), AudioOcclusionProbe(AudioOcclusionProbe), CharacterShape(CharacterShape),
}
Expand description

A loaded component of any registered type.

Variants§

§

Window(Window)

§

GraphicsConfig(GraphicsConfig)

§

Shader(Shader)

§

Camera3D(Camera3D)

§

FrameInput(FrameInput)

§

Prop(Prop)

§

RigidBody(RigidBody)

§

PropBody(PropBody)

§

Room(Room)

§

DirectionalLight(DirectionalLight)

§

PointLight(PointLight)

§

SpotLight(SpotLight)

§

RectAreaLight(RectAreaLight)

§

ProceduralMesh(ProceduralMesh)

§

Model(Model)

§

Scene(Scene)

§

TextLabel(TextLabel)

§

HitRegion(HitRegion)

§

File(File)

§

BlockType(BlockType)

§

VoxelChunk(VoxelChunk)

§

InstancedProp(InstancedProp)

§

PostProcessConfig(PostProcessConfig)

§

Animation(Animation)

§

SkeletonPose(SkeletonPose)

§

StreamingConfig(StreamingConfig)

§

VoxelWorld(VoxelWorld)

§

AudioEmitter(AudioEmitter)

§

Sprite(Sprite)

§

KeyBinding(KeyBinding)

§

Screen(Screen)

§

Decal(Decal)

§

VolumetricFog(VolumetricFog)

§

PhysicsJoint(PhysicsJoint)

§

ParticleEmitter(ParticleEmitter)

§

WaterSurface(WaterSurface)

§

SdfVolume(SdfVolume)

§

GlassPanel(GlassPanel)

§

LayoutContainer(LayoutContainer)

§

PhysicsConfig(PhysicsConfig)

§

FpsCounter(FpsCounter)

§

StatHud(StatHud)

§

ScrollPanel(ScrollPanel)

§

ReflectionProbe(ReflectionProbe)

§

Transform(Transform)

§

PropInstance(PropInstance)

§

MeshRenderer(MeshRenderer)

§

ModelRenderer(ModelRenderer)

§

Collider(Collider)

§

BodyDynamics(BodyDynamics)

§

Interactable(Interactable)

§

Pickup(Pickup)

§

Parent(Parent)

§

Children(Children)

§

SceneMember(SceneMember)

§

GlobalTransform(GlobalTransform)

§

RenderHandle(RenderHandle)

§

Held(Held)

§

Lifetime(Lifetime)

§

Spawner(Spawner)

§

DebugHud(DebugHud)

§

AudioCue(AudioCue)

§

Story(Story)

§

AppConfig(AppConfig)

§

AnimationGraph(AnimationGraph)

§

AnimationParams(AnimationParams)

§

CharacterRig(CharacterRig)

§

GroundProbes(GroundProbes)

§

CameraProbe(CameraProbe)

§

TextInput(TextInput)

§

Behavior(Behavior)

§

Variables(Variables)

§

TriggerVolume(TriggerVolume)

§

Hidden(Hidden)

§

LoadingOverlay(LoadingOverlay)

§

AudioOcclusionProbe(AudioOcclusionProbe)

§

CharacterShape(CharacterShape)

Implementations§

Source§

impl ComponentAsset

Source

pub fn from_baked(def: &BlobAssetDef) -> Result<Self, CnResult>

Reconstruct a component from a blob def: dispatch on the tag and deserialize the runtime component via Component::from_baked (every record is baked – cook already ran the asset -> component translation).

Source

pub fn inject_locator(&mut self, locator: PayloadLocator)

Inject a payload locator into the component after construction. Delegates to Component::inject_locator; a no-op for types that don’t override that method.

Trait Implementations§

Source§

impl Debug for ComponentAsset

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Animation> for ComponentAsset

Source§

fn from(c: Animation) -> Self

Converts to this type from the input type.
Source§

impl From<AnimationGraph> for ComponentAsset

Source§

fn from(c: AnimationGraph) -> Self

Converts to this type from the input type.
Source§

impl From<AnimationParams> for ComponentAsset

Source§

fn from(c: AnimationParams) -> Self

Converts to this type from the input type.
Source§

impl From<AppConfig> for ComponentAsset

Source§

fn from(c: AppConfig) -> Self

Converts to this type from the input type.
Source§

impl From<AudioCue> for ComponentAsset

Source§

fn from(c: AudioCue) -> Self

Converts to this type from the input type.
Source§

impl From<AudioEmitter> for ComponentAsset

Source§

fn from(c: AudioEmitter) -> Self

Converts to this type from the input type.
Source§

impl From<AudioOcclusionProbe> for ComponentAsset

Source§

fn from(c: AudioOcclusionProbe) -> Self

Converts to this type from the input type.
Source§

impl From<Behavior> for ComponentAsset

Source§

fn from(c: Behavior) -> Self

Converts to this type from the input type.
Source§

impl From<BlockType> for ComponentAsset

Source§

fn from(c: BlockType) -> Self

Converts to this type from the input type.
Source§

impl From<BodyDynamics> for ComponentAsset

Source§

fn from(c: BodyDynamics) -> Self

Converts to this type from the input type.
Source§

impl From<Camera3D> for ComponentAsset

Source§

fn from(c: Camera3D) -> Self

Converts to this type from the input type.
Source§

impl From<CameraProbe> for ComponentAsset

Source§

fn from(c: CameraProbe) -> Self

Converts to this type from the input type.
Source§

impl From<CharacterRig> for ComponentAsset

Source§

fn from(c: CharacterRig) -> Self

Converts to this type from the input type.
Source§

impl From<CharacterShape> for ComponentAsset

Source§

fn from(c: CharacterShape) -> Self

Converts to this type from the input type.
Source§

impl From<Children> for ComponentAsset

Source§

fn from(c: Children) -> Self

Converts to this type from the input type.
Source§

impl From<Collider> for ComponentAsset

Source§

fn from(c: Collider) -> Self

Converts to this type from the input type.
Source§

impl From<DebugHud> for ComponentAsset

Source§

fn from(c: DebugHud) -> Self

Converts to this type from the input type.
Source§

impl From<Decal> for ComponentAsset

Source§

fn from(c: Decal) -> Self

Converts to this type from the input type.
Source§

impl From<DirectionalLight> for ComponentAsset

Source§

fn from(c: DirectionalLight) -> Self

Converts to this type from the input type.
Source§

impl From<File> for ComponentAsset

Source§

fn from(c: File) -> Self

Converts to this type from the input type.
Source§

impl From<FpsCounter> for ComponentAsset

Source§

fn from(c: FpsCounter) -> Self

Converts to this type from the input type.
Source§

impl From<FrameInput> for ComponentAsset

Source§

fn from(c: FrameInput) -> Self

Converts to this type from the input type.
Source§

impl From<GlassPanel> for ComponentAsset

Source§

fn from(c: GlassPanel) -> Self

Converts to this type from the input type.
Source§

impl From<GlobalTransform> for ComponentAsset

Source§

fn from(c: GlobalTransform) -> Self

Converts to this type from the input type.
Source§

impl From<GraphicsConfig> for ComponentAsset

Source§

fn from(c: GraphicsConfig) -> Self

Converts to this type from the input type.
Source§

impl From<GroundProbes> for ComponentAsset

Source§

fn from(c: GroundProbes) -> Self

Converts to this type from the input type.
Source§

impl From<Held> for ComponentAsset

Source§

fn from(c: Held) -> Self

Converts to this type from the input type.
Source§

impl From<Hidden> for ComponentAsset

Source§

fn from(c: Hidden) -> Self

Converts to this type from the input type.
Source§

impl From<HitRegion> for ComponentAsset

Source§

fn from(c: HitRegion) -> Self

Converts to this type from the input type.
Source§

impl From<InstancedProp> for ComponentAsset

Source§

fn from(c: InstancedProp) -> Self

Converts to this type from the input type.
Source§

impl From<Interactable> for ComponentAsset

Source§

fn from(c: Interactable) -> Self

Converts to this type from the input type.
Source§

impl From<KeyBinding> for ComponentAsset

Source§

fn from(c: KeyBinding) -> Self

Converts to this type from the input type.
Source§

impl From<LayoutContainer> for ComponentAsset

Source§

fn from(c: LayoutContainer) -> Self

Converts to this type from the input type.
Source§

impl From<Lifetime> for ComponentAsset

Source§

fn from(c: Lifetime) -> Self

Converts to this type from the input type.
Source§

impl From<LoadingOverlay> for ComponentAsset

Source§

fn from(c: LoadingOverlay) -> Self

Converts to this type from the input type.
Source§

impl From<MeshRenderer> for ComponentAsset

Source§

fn from(c: MeshRenderer) -> Self

Converts to this type from the input type.
Source§

impl From<Model> for ComponentAsset

Source§

fn from(c: Model) -> Self

Converts to this type from the input type.
Source§

impl From<ModelRenderer> for ComponentAsset

Source§

fn from(c: ModelRenderer) -> Self

Converts to this type from the input type.
Source§

impl From<Parent> for ComponentAsset

Source§

fn from(c: Parent) -> Self

Converts to this type from the input type.
Source§

impl From<ParticleEmitter> for ComponentAsset

Source§

fn from(c: ParticleEmitter) -> Self

Converts to this type from the input type.
Source§

impl From<PhysicsConfig> for ComponentAsset

Source§

fn from(c: PhysicsConfig) -> Self

Converts to this type from the input type.
Source§

impl From<PhysicsJoint> for ComponentAsset

Source§

fn from(c: PhysicsJoint) -> Self

Converts to this type from the input type.
Source§

impl From<Pickup> for ComponentAsset

Source§

fn from(c: Pickup) -> Self

Converts to this type from the input type.
Source§

impl From<PointLight> for ComponentAsset

Source§

fn from(c: PointLight) -> Self

Converts to this type from the input type.
Source§

impl From<PostProcessConfig> for ComponentAsset

Source§

fn from(c: PostProcessConfig) -> Self

Converts to this type from the input type.
Source§

impl From<ProceduralMesh> for ComponentAsset

Source§

fn from(c: ProceduralMesh) -> Self

Converts to this type from the input type.
Source§

impl From<Prop> for ComponentAsset

Source§

fn from(c: Prop) -> Self

Converts to this type from the input type.
Source§

impl From<PropBody> for ComponentAsset

Source§

fn from(c: PropBody) -> Self

Converts to this type from the input type.
Source§

impl From<PropInstance> for ComponentAsset

Source§

fn from(c: PropInstance) -> Self

Converts to this type from the input type.
Source§

impl From<RectAreaLight> for ComponentAsset

Source§

fn from(c: RectAreaLight) -> Self

Converts to this type from the input type.
Source§

impl From<ReflectionProbe> for ComponentAsset

Source§

fn from(c: ReflectionProbe) -> Self

Converts to this type from the input type.
Source§

impl From<RenderHandle> for ComponentAsset

Source§

fn from(c: RenderHandle) -> Self

Converts to this type from the input type.
Source§

impl From<RigidBody> for ComponentAsset

Source§

fn from(c: RigidBody) -> Self

Converts to this type from the input type.
Source§

impl From<Room> for ComponentAsset

Source§

fn from(c: Room) -> Self

Converts to this type from the input type.
Source§

impl From<Scene> for ComponentAsset

Source§

fn from(c: Scene) -> Self

Converts to this type from the input type.
Source§

impl From<SceneMember> for ComponentAsset

Source§

fn from(c: SceneMember) -> Self

Converts to this type from the input type.
Source§

impl From<Screen> for ComponentAsset

Source§

fn from(c: Screen) -> Self

Converts to this type from the input type.
Source§

impl From<ScrollPanel> for ComponentAsset

Source§

fn from(c: ScrollPanel) -> Self

Converts to this type from the input type.
Source§

impl From<SdfVolume> for ComponentAsset

Source§

fn from(c: SdfVolume) -> Self

Converts to this type from the input type.
Source§

impl From<Shader> for ComponentAsset

Source§

fn from(c: Shader) -> Self

Converts to this type from the input type.
Source§

impl From<SkeletonPose> for ComponentAsset

Source§

fn from(c: SkeletonPose) -> Self

Converts to this type from the input type.
Source§

impl From<Spawner> for ComponentAsset

Source§

fn from(c: Spawner) -> Self

Converts to this type from the input type.
Source§

impl From<SpotLight> for ComponentAsset

Source§

fn from(c: SpotLight) -> Self

Converts to this type from the input type.
Source§

impl From<Sprite> for ComponentAsset

Source§

fn from(c: Sprite) -> Self

Converts to this type from the input type.
Source§

impl From<StatHud> for ComponentAsset

Source§

fn from(c: StatHud) -> Self

Converts to this type from the input type.
Source§

impl From<Story> for ComponentAsset

Source§

fn from(c: Story) -> Self

Converts to this type from the input type.
Source§

impl From<StreamingConfig> for ComponentAsset

Source§

fn from(c: StreamingConfig) -> Self

Converts to this type from the input type.
Source§

impl From<TextInput> for ComponentAsset

Source§

fn from(c: TextInput) -> Self

Converts to this type from the input type.
Source§

impl From<TextLabel> for ComponentAsset

Source§

fn from(c: TextLabel) -> Self

Converts to this type from the input type.
Source§

impl From<Transform> for ComponentAsset

Source§

fn from(c: Transform) -> Self

Converts to this type from the input type.
Source§

impl From<TriggerVolume> for ComponentAsset

Source§

fn from(c: TriggerVolume) -> Self

Converts to this type from the input type.
Source§

impl From<Variables> for ComponentAsset

Source§

fn from(c: Variables) -> Self

Converts to this type from the input type.
Source§

impl From<VolumetricFog> for ComponentAsset

Source§

fn from(c: VolumetricFog) -> Self

Converts to this type from the input type.
Source§

impl From<VoxelChunk> for ComponentAsset

Source§

fn from(c: VoxelChunk) -> Self

Converts to this type from the input type.
Source§

impl From<VoxelWorld> for ComponentAsset

Source§

fn from(c: VoxelWorld) -> Self

Converts to this type from the input type.
Source§

impl From<WaterSurface> for ComponentAsset

Source§

fn from(c: WaterSurface) -> Self

Converts to this type from the input type.
Source§

impl From<Window> for ComponentAsset

Source§

fn from(c: Window) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.