Skip to main content

engage/generated/unity_engine/
color32.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-color32-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::{
9        object::{IObject, Object},
10        valuetype::{IValueType, ValueType},
11    };
12
13    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/color32/Color32.md"))]
14    #[repr(C)]
15    #[derive(::core::clone::Clone, ::core::marker::Copy)]
16    pub struct Color32 {
17        pub rgba: i32,
18        pub r: u8,
19        pub g: u8,
20        pub b: u8,
21        pub a: u8,
22    }
23    impl ::unity::ClassIdentity for Color32 {
24        const NAME: &'static str = "Color32";
25        const NAMESPACE: &'static str = "UnityEngine";
26
27        fn class() -> ::unity::Class {
28            static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
29            *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
30        }
31    }
32    impl ::unity::IlType for Color32 {
33        fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
34            &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
35        }
36    }
37}
38
39#[cfg(feature = "unity_engine-color32-types")]
40pub use __types::*;
41
42#[cfg(feature = "unity_engine-color32")]
43impl Color32 {
44    #[doc = "`op_Implicit(crate::unity_engine::color::Color)` overload"]
45    pub fn op_implicit(c: impl ::core::convert::Into<crate::unity_engine::color::Color>) -> crate::unity_engine::color32::Color32 {
46        unsafe {
47            ::unity::il2cpp_call!((::unity::module_base()+0x2c41580usize)as*mut u8,crate::unity_engine::color32::Color32;
48(crate::unity_engine::color::Color)::core::convert::Into::into(c))
49        }
50    }
51
52    #[doc = "`op_Implicit(crate::unity_engine::color32::Color32)` overload"]
53    pub fn op_implicit_2(c: impl ::core::convert::Into<crate::unity_engine::color32::Color32>) -> crate::unity_engine::color::Color {
54        unsafe {
55            ::unity::il2cpp_call!((::unity::module_base()+0x2c41820usize)as*mut u8,crate::unity_engine::color::Color;
56(crate::unity_engine::color32::Color32)::core::convert::Into::into(c))
57        }
58    }
59}
60
61#[cfg(feature = "unity_engine-color32")]
62impl Color32 {
63    #[doc = "`.ctor(u8, u8, u8, u8)` overload"]
64    pub fn ctor(
65        &mut self,
66        r: impl ::core::convert::Into<u8>,
67        g: impl ::core::convert::Into<u8>,
68        b: impl ::core::convert::Into<u8>,
69        a: impl ::core::convert::Into<u8>,
70    ) -> () {
71        unsafe {
72            ::unity::il2cpp_call!((::unity::module_base()+0x2c41560usize)as*mut u8,();
73(*mut Color32)self as*mut Color32,(u8)::core::convert::Into::into(r),(u8)::core::convert::Into::into(g),(u8)::core::convert::Into::into(b),(u8)::core::convert::Into::into(a))
74        }
75    }
76
77    #[doc = "`ToString()` overload"]
78    pub fn to_string(&mut self) -> ::unity::Il2CppString {
79        unsafe {
80            ::unity::il2cpp_call!((::unity::module_base()+0x2c41860usize)as*mut u8, ::unity::Il2CppString;
81(*mut Color32)self as*mut Color32)
82        }
83    }
84}
85
86#[cfg(feature = "unity_engine-color32")]
87impl Color32 {
88    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
89        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
90    }
91
92    pub fn op_implicit_method_info() -> &'static ::unity::il2cpp::MethodInfo {
93        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
94    }
95
96    pub fn op_implicit_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
97        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
98    }
99
100    pub fn to_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
101        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
102    }
103}
104
105#[cfg(feature = "unity_engine-color32")]
106#[doc(hidden)]
107pub mod prelude {
108    pub use super::Color32;
109    #[cfg(feature = "system-object")]
110    pub use crate::system::object::IObjectMethods;
111    #[cfg(feature = "system-valuetype")]
112    pub use crate::system::valuetype::IValueTypeMethods;
113    pub use crate::system::{object::IObject, valuetype::IValueType};
114}