pub struct HaMaterialInstance {
pub reference: MaterialReference,
pub values: HashMap<String, MaterialValue>,
pub override_draw_options: Option<MaterialDrawOptions>,
}Fields§
§reference: MaterialReference§values: HashMap<String, MaterialValue>§override_draw_options: Option<MaterialDrawOptions>Implementations§
source§impl HaMaterialInstance
impl HaMaterialInstance
pub fn new(reference: MaterialReference) -> Self
pub fn with_value(self, name: impl ToString, value: MaterialValue) -> Self
pub fn with_override_draw_options(self, options: MaterialDrawOptions) -> Self
pub fn update_references( &mut self, material_mapping: &MaterialResourceMapping, image_mapping: &ImageResourceMapping )
Trait Implementations§
source§impl Clone for HaMaterialInstance
impl Clone for HaMaterialInstance
source§fn clone(&self) -> HaMaterialInstance
fn clone(&self) -> HaMaterialInstance
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for HaMaterialInstance
impl Debug for HaMaterialInstance
source§impl Default for HaMaterialInstance
impl Default for HaMaterialInstance
source§fn default() -> HaMaterialInstance
fn default() -> HaMaterialInstance
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for HaMaterialInstance
impl<'de> Deserialize<'de> for HaMaterialInstance
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Prefab for HaMaterialInstance
impl Prefab for HaMaterialInstance
fn from_prefab(data: &Value) -> Result<Self, PrefabError>
fn from_prefab_with_extras( data: &Value, _named_entities: &HashMap<String, Entity, RandomState>, _state_token: ID<PhantomData<dyn State + Send + Sync>> ) -> Result<Self, PrefabError>
fn to_prefab(&self) -> Result<Value, PrefabError>
fn from_prefab_str(data: &str) -> Result<Self, PrefabError>
fn to_prefab_string(&self) -> Result<String, PrefabError>
fn post_from_prefab(&mut self)
source§impl Serialize for HaMaterialInstance
impl Serialize for HaMaterialInstance
impl PrefabComponent for HaMaterialInstance
Auto Trait Implementations§
impl RefUnwindSafe for HaMaterialInstance
impl Send for HaMaterialInstance
impl Sync for HaMaterialInstance
impl Unpin for HaMaterialInstance
impl UnwindSafe for HaMaterialInstance
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Initialize for Twhere
T: Default,
impl<T> Initialize for Twhere T: Default,
fn initialize(&mut self)
§unsafe fn initialize_raw(data: *mut ())
unsafe fn initialize_raw(data: *mut ())
Safety Read more