pub struct Renderer {
pub renderer: ObjRef,
pub game_object: i64,
pub path: String,
pub layer: u32,
pub mesh: ObjRef,
pub materials: Vec<Option<ObjRef>>,
pub world: Matrix,
pub submeshes: Option<(u32, u32)>,
pub cast_shadows: i64,
pub receive_shadows: Option<bool>,
pub off: Vec<OffFlag>,
pub skin: Option<RendererSkin>,
}Expand description
A mesh renderer with a mesh, whatever its state.
Fields§
§renderer: ObjRefThe renderer object.
game_object: i64Its GameObject, in the scene file.
path: StringThe GameObject path, names from the root joined by /.
layer: u32Its GameObject’s layer.
mesh: ObjRefThe mesh (a SkinnedMeshRenderer’s own, else its MeshFilter’s).
materials: Vec<Option<ObjRef>>m_Materials, one entry per submesh slot; None for a null pointer.
world: MatrixWorld matrix in Unity’s frame (the identity for a static-batched renderer).
submeshes: Option<(u32, u32)>A static-batched renderer’s slice of its combined mesh: first submesh, count.
cast_shadows: i64m_CastShadows: 0 off, 1 on, 2 two-sided, 3 shadows only (1 when absent, Unity’s default).
receive_shadows: Option<bool>m_ReceiveShadows, when stored.
off: Vec<OffFlag>What keeps it from being drawn; drawn when empty.
skin: Option<RendererSkin>A SkinnedMeshRenderer’s bones; None for a MeshRenderer.
Trait Implementations§
impl StructuralPartialEq for Renderer
Auto Trait Implementations§
impl Freeze for Renderer
impl RefUnwindSafe for Renderer
impl Send for Renderer
impl Sync for Renderer
impl Unpin for Renderer
impl UnsafeUnpin for Renderer
impl UnwindSafe for Renderer
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