engage/generated/tm_pro/
setpropertyutility_2.rs1#[cfg(feature = "tm_pro-setpropertyutility_2-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::object::{IObject, Object};
9
10 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/tm_pro/setpropertyutility_2/SetPropertyUtility_2.md"))]
11 #[::unity::class(namespace = "TMPro", name = "SetPropertyUtility")]
12 #[parent(crate::system::object::Object)]
13 pub struct SetPropertyUtility_2 {}
14}
15
16#[cfg(feature = "tm_pro-setpropertyutility_2-types")]
17pub use __types::*;
18
19#[cfg(feature = "tm_pro-setpropertyutility_2")]
20impl SetPropertyUtility_2 {
21 #[doc = "`SetColor(*mutcrate::unity_engine::color::Color, crate::unity_engine::color::Color)` overload"]
22 pub fn set_color(new_value: impl ::core::convert::Into<crate::unity_engine::color::Color>) -> (bool, crate::unity_engine::color::Color) {
23 unsafe {
24 let mut __out_0 = ::core::mem::MaybeUninit::<crate::unity_engine::color::Color>::uninit();
25 let __ret = {
26 ::unity::il2cpp_call!((::unity::module_base()+0x2d8e920usize)as*mut u8,bool;
27(*mut crate::unity_engine::color::Color)__out_0.as_mut_ptr(),(crate::unity_engine::color::Color)::core::convert::Into::into(new_value))
28 };
29 (__ret, __out_0.assume_init())
30 }
31 }
32
33 pub fn set_equatable_struct<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
34 current_value: impl ::core::convert::Into<*mut M0>,
35 new_value: impl ::core::convert::Into<M0>,
36 ) -> bool {
37 static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
38 ::unity::lookup::method_info_on_class(<SetPropertyUtility_2 as ::unity::ClassIdentity>::class(), "SetEquatableStruct", 2)
39 });
40 #[allow(clippy::type_complexity)]
41 static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
42 ::std::sync::OnceLock::new();
43 let _ = true;
44 let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
45 ::core::result::Result::Ok(mi) => *mi,
46 ::core::result::Result::Err(e) => {
47 panic!(
48 "method lookup failed: {}
49::{}
50: {}
51",
52 <SetPropertyUtility_2 as ::unity::ClassIdentity>::NAME,
53 "SetEquatableStruct",
54 e
55 )
56 },
57 };
58 let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
59 let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
60 let __inflated: &'static ::unity::il2cpp::MethodInfo = {
61 let mut __guard = __cache.lock().unwrap();
62 *__guard
63 .entry(__key)
64 .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
65 };
66 unsafe {
67 let __f: extern "C" fn(*mut M0, M0, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__inflated.method_ptr);
68 let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
69 __f(
70 ::core::convert::Into::into(current_value),
71 ::core::convert::Into::into(new_value),
72 ::core::option::Option::Some(__mi_opaque),
73 )
74 }
75 }
76
77 pub fn set_struct<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
78 current_value: impl ::core::convert::Into<*mut M0>,
79 new_value: impl ::core::convert::Into<M0>,
80 ) -> bool {
81 static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
82 ::unity::lookup::method_info_on_class(<SetPropertyUtility_2 as ::unity::ClassIdentity>::class(), "SetStruct", 2)
83 });
84 #[allow(clippy::type_complexity)]
85 static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
86 ::std::sync::OnceLock::new();
87 let _ = true;
88 let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
89 ::core::result::Result::Ok(mi) => *mi,
90 ::core::result::Result::Err(e) => {
91 panic!(
92 "method lookup failed: {}
93::{}
94: {}
95",
96 <SetPropertyUtility_2 as ::unity::ClassIdentity>::NAME,
97 "SetStruct",
98 e
99 )
100 },
101 };
102 let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
103 let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
104 let __inflated: &'static ::unity::il2cpp::MethodInfo = {
105 let mut __guard = __cache.lock().unwrap();
106 *__guard
107 .entry(__key)
108 .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
109 };
110 unsafe {
111 let __f: extern "C" fn(*mut M0, M0, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__inflated.method_ptr);
112 let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
113 __f(
114 ::core::convert::Into::into(current_value),
115 ::core::convert::Into::into(new_value),
116 ::core::option::Option::Some(__mi_opaque),
117 )
118 }
119 }
120
121 pub fn set_class<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
122 current_value: impl ::core::convert::Into<*mut M0>,
123 new_value: impl ::core::convert::Into<M0>,
124 ) -> bool {
125 static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
126 ::unity::lookup::method_info_on_class(<SetPropertyUtility_2 as ::unity::ClassIdentity>::class(), "SetClass", 2)
127 });
128 #[allow(clippy::type_complexity)]
129 static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
130 ::std::sync::OnceLock::new();
131 let _ = true;
132 let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
133 ::core::result::Result::Ok(mi) => *mi,
134 ::core::result::Result::Err(e) => {
135 panic!(
136 "method lookup failed: {}
137::{}
138: {}
139",
140 <SetPropertyUtility_2 as ::unity::ClassIdentity>::NAME,
141 "SetClass",
142 e
143 )
144 },
145 };
146 let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
147 let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
148 let __inflated: &'static ::unity::il2cpp::MethodInfo = {
149 let mut __guard = __cache.lock().unwrap();
150 *__guard
151 .entry(__key)
152 .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
153 };
154 unsafe {
155 let __f: extern "C" fn(*mut M0, M0, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__inflated.method_ptr);
156 let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
157 __f(
158 ::core::convert::Into::into(current_value),
159 ::core::convert::Into::into(new_value),
160 ::core::option::Option::Some(__mi_opaque),
161 )
162 }
163 }
164}
165
166#[cfg(feature = "tm_pro-setpropertyutility_2")]
167impl SetPropertyUtility_2 {
168 pub fn set_color_method_info() -> &'static ::unity::il2cpp::MethodInfo {
169 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
170 }
171}
172
173#[cfg(feature = "tm_pro-setpropertyutility_2")]
174#[doc(hidden)]
175pub mod prelude {
176 pub use super::{ISetPropertyUtility_2, SetPropertyUtility_2};
177 pub use crate::system::object::IObject;
178 #[cfg(feature = "system-object")]
179 pub use crate::system::object::IObjectMethods;
180}