Gradient

Struct Gradient 

Source
pub struct Gradient {
Show 33 fields pub atime0: Option<u16>, pub atime1: Option<u16>, pub atime2: Option<u16>, pub atime3: Option<u16>, pub atime4: Option<u16>, pub atime5: Option<u16>, pub atime6: Option<u16>, pub atime7: Option<u16>, pub ctime0: Option<u16>, pub ctime1: Option<u16>, pub ctime2: Option<u16>, pub ctime3: Option<u16>, pub ctime4: Option<u16>, pub ctime5: Option<u16>, pub ctime6: Option<u16>, pub ctime7: Option<u16>, pub key0: Option<ColorRGBA>, pub key1: Option<ColorRGBA>, pub key2: Option<ColorRGBA>, pub key3: Option<ColorRGBA>, pub key4: Option<ColorRGBA>, pub key5: Option<ColorRGBA>, pub key6: Option<ColorRGBA>, pub key7: Option<ColorRGBA>, pub m_ColorSpace: Option<i8>, pub m_Color_0_: Option<ColorRGBA>, pub m_Color_1_: Option<ColorRGBA>, pub m_Color_2_: Option<ColorRGBA>, pub m_Color_3_: Option<ColorRGBA>, pub m_Color_4_: Option<ColorRGBA>, pub m_Mode: Option<i32>, pub m_NumAlphaKeys: Option<u8>, pub m_NumColorKeys: Option<u8>,
}
Expand description

Gradient is a sub class of the Unity engine since version 3.4.0. Exert from Unity’s scripting documentation: Represents a Gradient used for animating colors. Gradients allow animating or interpolating colors by having several “color keys” and “alpha keys”. Color keys and alpha keys are separate, and each key has a time specified for it, ranging from 0.0 (0%) to 1.0 (100%). Note that the alpha and colors keys will be automatically sorted by time value and that it is ensured to always have a minimum of 2 color keys and 2 alpha keys.How the colors are interpolated between the keys is controlled by GradientMode.Public Gradient variables used in scripts automatically display the gradient editor in the inspector window. GradientUsageAttribute allows specifying whether the gradient colors should be high dynamic range for editing. See Also: GradientColorKey, GradientAlphaKey, SerializedProperty.gradientValue.

Fields§

§atime0: Option<u16>

u16: (5.5.0f3 - 2022.3.2f1)

§atime1: Option<u16>

u16: (5.5.0f3 - 2022.3.2f1)

§atime2: Option<u16>

u16: (5.5.0f3 - 2022.3.2f1)

§atime3: Option<u16>

u16: (5.5.0f3 - 2022.3.2f1)

§atime4: Option<u16>

u16: (5.5.0f3 - 2022.3.2f1)

§atime5: Option<u16>

u16: (5.5.0f3 - 2022.3.2f1)

§atime6: Option<u16>

u16: (5.5.0f3 - 2022.3.2f1)

§atime7: Option<u16>

u16: (5.5.0f3 - 2022.3.2f1)

§ctime0: Option<u16>

u16: (5.5.0f3 - 2022.3.2f1)

§ctime1: Option<u16>

u16: (5.5.0f3 - 2022.3.2f1)

§ctime2: Option<u16>

u16: (5.5.0f3 - 2022.3.2f1)

§ctime3: Option<u16>

u16: (5.5.0f3 - 2022.3.2f1)

§ctime4: Option<u16>

u16: (5.5.0f3 - 2022.3.2f1)

§ctime5: Option<u16>

u16: (5.5.0f3 - 2022.3.2f1)

§ctime6: Option<u16>

u16: (5.5.0f3 - 2022.3.2f1)

§ctime7: Option<u16>

u16: (5.5.0f3 - 2022.3.2f1)

§key0: Option<ColorRGBA>

ColorRGBA: (5.5.0f3 - 2022.3.2f1)

§key1: Option<ColorRGBA>

ColorRGBA: (5.5.0f3 - 2022.3.2f1)

§key2: Option<ColorRGBA>

ColorRGBA: (5.5.0f3 - 2022.3.2f1)

§key3: Option<ColorRGBA>

ColorRGBA: (5.5.0f3 - 2022.3.2f1)

§key4: Option<ColorRGBA>

ColorRGBA: (5.5.0f3 - 2022.3.2f1)

§key5: Option<ColorRGBA>

ColorRGBA: (5.5.0f3 - 2022.3.2f1)

§key6: Option<ColorRGBA>

ColorRGBA: (5.5.0f3 - 2022.3.2f1)

§key7: Option<ColorRGBA>

ColorRGBA: (5.5.0f3 - 2022.3.2f1)

§m_ColorSpace: Option<i8>

Indicates the color space that the gradient color keys are using. i8: (2022.2.0b1 - 2022.3.2f1)

§m_Color_0_: Option<ColorRGBA>

ColorRGBA: (3.4.0 - 5.4.6f3)

§m_Color_1_: Option<ColorRGBA>

ColorRGBA: (3.4.0 - 5.4.6f3)

§m_Color_2_: Option<ColorRGBA>

ColorRGBA: (3.4.0 - 5.4.6f3)

§m_Color_3_: Option<ColorRGBA>

ColorRGBA: (3.4.0 - 5.4.6f3)

§m_Color_4_: Option<ColorRGBA>

ColorRGBA: (3.4.0 - 5.4.6f3)

§m_Mode: Option<i32>

Controls how the gradient colors are interpolated. i32: (5.5.0f3 - 2022.1.24f1); u8: (2022.2.0b1 - 2022.3.2f1)

§m_NumAlphaKeys: Option<u8>

u8: (5.5.0f3 - 2022.3.2f1)

§m_NumColorKeys: Option<u8>

u8: (5.5.0f3 - 2022.3.2f1)

Trait Implementations§

Source§

impl Debug for Gradient

Source§

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

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

impl<'de> Deserialize<'de> for Gradient

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 Gradient

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>,