SpriteBone

Struct SpriteBone 

Source
pub struct SpriteBone {
    pub length: f32,
    pub name: String,
    pub parentId: i32,
    pub position: Vector3f,
    pub rotation: Quaternionf,
    pub color: Option<ColorRGBA>,
    pub guid: Option<String>,
}
Expand description

SpriteBone is a sub class of the Unity engine since version 2018.1.0b2. Exert from Unity’s scripting documentation: Stores a set of information that describes the bind pose of this Sprite. This struct describes the hierarchy and other spatial relationships between the bones of this Sprite.

Fields§

§length: f32

The length of the bone. This is important for the leaf bones to describe their length without needing another bone as the terminal bone.

§name: String

The name of the bone. This is useful when recreating bone hierarchy at editor or runtime. You can also use this as a way of resolving the bone path when a Sprite is bound to a more complex or richer hierarchy.

§parentId: i32

The ID of the parent of this bone.

§position: Vector3f

The position in local space of this bone.

§rotation: Quaternionf

The rotation of this bone in local space.

§color: Option<ColorRGBA>

Shows the color set for the bone in the Editor. ColorRGBA: (2021.1.0b1 - 2022.3.2f1)

§guid: Option<String>

The Unique GUID of this bone. String: (2021.1.0b1 - 2022.3.2f1)

Trait Implementations§

Source§

impl Debug for SpriteBone

Source§

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

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

impl<'de> Deserialize<'de> for SpriteBone

Source§

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 Serialize for SpriteBone

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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 = Infallible

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.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,