pub struct PendingFill {
pub function: String,
pub args: Vec<String>,
}Expand description
A use site the build could not finish, waiting for the script to fill it.
A component element names a script function. When instantiating the block that function returns is the same as calling it, the build puts the block in the tree and nothing is left to do. When the function has to run, because it works a value out or picks between blocks, what the build leaves is one element carrying this: the function’s name and the arguments the use site bound, in the order the call passes them.
The script runtime calls the function, replaces this element with the node it returns, and drops the marker. That runs on the tick the element was mounted, ahead of the command applier, so the tree is whole before it is drawn.
Fields§
§function: StringScript function to call.
args: Vec<String>Argument values, in the function’s parameter order.
Trait Implementations§
Source§impl Clone for PendingFill
impl Clone for PendingFill
Source§fn clone(&self) -> PendingFill
fn clone(&self) -> PendingFill
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Component for PendingFill
impl Component for PendingFill
Source§const STORAGE_TYPE: StorageType = bevy_ecs::component::StorageType::Table
const STORAGE_TYPE: StorageType = bevy_ecs::component::StorageType::Table
Source§type Mutability = Mutable
type Mutability = Mutable
Component<Mutability = Mutable>,
while immutable components will instead have Component<Mutability = Immutable>. Read moreSource§fn register_required_components(
_requiree: ComponentId,
required_components: &mut RequiredComponentsRegistrator<'_, '_>,
)
fn register_required_components( _requiree: ComponentId, required_components: &mut RequiredComponentsRegistrator<'_, '_>, )
Source§fn clone_behavior() -> ComponentCloneBehavior
fn clone_behavior() -> ComponentCloneBehavior
Source§fn relationship_accessor() -> Option<ComponentRelationshipAccessor<Self>>
fn relationship_accessor() -> Option<ComponentRelationshipAccessor<Self>>
ComponentRelationshipAccessor] required for working with relationships in dynamic contexts. Read more§fn on_discard() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_discard() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
§fn on_despawn() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_despawn() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
§fn map_entities<E>(_this: &mut Self, _mapper: &mut E)where
E: EntityMapper,
fn map_entities<E>(_this: &mut Self, _mapper: &mut E)where
E: EntityMapper,
EntityMapper. This is used to remap entities in contexts like scenes and entity cloning.
When deriving Component, this is populated by annotating fields containing entities with #[entities] Read more