Skip to main content

DynamicTextMaterial

Trait DynamicTextMaterial 

Source
pub trait DynamicTextMaterial:
    Send
    + Sync
    + 'static {
    // Required method
    fn insert_from_args(
        &self,
        args: &[Cow<'static, str>],
        entity: &mut EntityCommands<'_>,
        server: &AssetServer,
    ) -> Result<()>;
}
Expand description

Constructs Self from args and inserts into an entity.

See material.

This trait should be derived with TextMaterial2d.

Required Methods§

Source

fn insert_from_args( &self, args: &[Cow<'static, str>], entity: &mut EntityCommands<'_>, server: &AssetServer, ) -> Result<()>

Construct a dynamic material from args and insert into entity.

Returns a BevyError if the material can not constructed from args.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§