1#[cfg(feature = "tm_pro-tmp_textinfo-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/tmp_textinfo/TMP_TextInfo.md"))]
11 #[::unity::class(namespace = "TMPro", name = "TMP_TextInfo")]
12 #[parent(crate::system::object::Object)]
13 pub struct TMP_TextInfo {
14 #[static_field]
15 #[rename(name = "k_InfinityVectorPositive")]
16 pub k_infinity_vector_positive: crate::unity_engine::vector2::Vector2,
17 #[static_field]
18 #[rename(name = "k_InfinityVectorNegative")]
19 pub k_infinity_vector_negative: crate::unity_engine::vector2::Vector2,
20 #[offset(16)]
21 #[rename(name = "textComponent")]
22 pub text_component: crate::tm_pro::tmp_text::TMP_Text,
23 #[offset(24)]
24 #[rename(name = "characterCount")]
25 pub character_count: i32,
26 #[offset(28)]
27 #[rename(name = "spriteCount")]
28 pub sprite_count: i32,
29 #[offset(32)]
30 #[rename(name = "spaceCount")]
31 pub space_count: i32,
32 #[offset(36)]
33 #[rename(name = "wordCount")]
34 pub word_count: i32,
35 #[offset(40)]
36 #[rename(name = "linkCount")]
37 pub link_count: i32,
38 #[offset(44)]
39 #[rename(name = "lineCount")]
40 pub line_count: i32,
41 #[offset(48)]
42 #[rename(name = "pageCount")]
43 pub page_count: i32,
44 #[offset(52)]
45 #[rename(name = "materialCount")]
46 pub material_count: i32,
47 #[offset(56)]
48 #[rename(name = "characterInfo")]
49 pub character_info: ::unity::Array<crate::tm_pro::tmp_characterinfo::TMP_CharacterInfo>,
50 #[offset(64)]
51 #[rename(name = "wordInfo")]
52 pub word_info: ::unity::Array<crate::tm_pro::tmp_wordinfo::TMP_WordInfo>,
53 #[offset(72)]
54 #[rename(name = "linkInfo")]
55 pub link_info: ::unity::Array<crate::tm_pro::tmp_linkinfo::TMP_LinkInfo>,
56 #[offset(80)]
57 #[rename(name = "lineInfo")]
58 pub line_info: ::unity::Array<crate::tm_pro::tmp_lineinfo::TMP_LineInfo>,
59 #[offset(88)]
60 #[rename(name = "pageInfo")]
61 pub page_info: ::unity::Array<crate::tm_pro::tmp_pageinfo::TMP_PageInfo>,
62 #[offset(96)]
63 #[rename(name = "meshInfo")]
64 pub mesh_info: ::unity::Array<crate::tm_pro::tmp_meshinfo::TMP_MeshInfo>,
65 #[offset(104)]
66 #[rename(name = "m_CachedMeshInfo")]
67 pub m_cached_mesh_info: ::unity::Array<crate::tm_pro::tmp_meshinfo::TMP_MeshInfo>,
68 }
69}
70
71#[cfg(feature = "tm_pro-tmp_textinfo-types")]
72pub use __types::*;
73
74#[cfg(feature = "tm_pro-tmp_textinfo")]
75impl TMP_TextInfo {
76 pub fn resize<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
77 array: impl ::core::convert::Into<*mut ::unity::Array<M0>>,
78 size: impl ::core::convert::Into<i32>,
79 ) -> () {
80 static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> =
81 ::std::sync::LazyLock::new(|| ::unity::lookup::method_info_on_class(<TMP_TextInfo as ::unity::ClassIdentity>::class(), "Resize", 2));
82 #[allow(clippy::type_complexity)]
83 static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
84 ::std::sync::OnceLock::new();
85 let _ = true;
86 let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
87 ::core::result::Result::Ok(mi) => *mi,
88 ::core::result::Result::Err(e) => {
89 panic!(
90 "method lookup failed: {}
91::{}
92: {}
93",
94 <TMP_TextInfo as ::unity::ClassIdentity>::NAME,
95 "Resize",
96 e
97 )
98 },
99 };
100 let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
101 let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
102 let __inflated: &'static ::unity::il2cpp::MethodInfo = {
103 let mut __guard = __cache.lock().unwrap();
104 *__guard
105 .entry(__key)
106 .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
107 };
108 unsafe {
109 let __f: extern "C" fn(*mut ::unity::Array<M0>, i32, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__inflated.method_ptr);
110 let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
111 __f(
112 ::core::convert::Into::into(array),
113 ::core::convert::Into::into(size),
114 ::core::option::Option::Some(__mi_opaque),
115 )
116 }
117 }
118
119 pub fn resize_2<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
120 array: impl ::core::convert::Into<*mut ::unity::Array<M0>>,
121 size: impl ::core::convert::Into<i32>,
122 is_block_allocated: impl ::core::convert::Into<bool>,
123 ) -> () {
124 static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> =
125 ::std::sync::LazyLock::new(|| ::unity::lookup::method_info_on_class(<TMP_TextInfo as ::unity::ClassIdentity>::class(), "Resize", 3));
126 #[allow(clippy::type_complexity)]
127 static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
128 ::std::sync::OnceLock::new();
129 let _ = true;
130 let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
131 ::core::result::Result::Ok(mi) => *mi,
132 ::core::result::Result::Err(e) => {
133 panic!(
134 "method lookup failed: {}
135::{}
136: {}
137",
138 <TMP_TextInfo as ::unity::ClassIdentity>::NAME,
139 "Resize",
140 e
141 )
142 },
143 };
144 let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
145 let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
146 let __inflated: &'static ::unity::il2cpp::MethodInfo = {
147 let mut __guard = __cache.lock().unwrap();
148 *__guard
149 .entry(__key)
150 .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
151 };
152 unsafe {
153 let __f: extern "C" fn(*mut ::unity::Array<M0>, i32, bool, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__inflated.method_ptr);
154 let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
155 __f(
156 ::core::convert::Into::into(array),
157 ::core::convert::Into::into(size),
158 ::core::convert::Into::into(is_block_allocated),
159 ::core::option::Option::Some(__mi_opaque),
160 )
161 }
162 }
163
164 #[doc = "`.cctor()` overload"]
165 pub fn cctor() -> () {
166 unsafe {
167 ::unity::il2cpp_call!((::unity::module_base()+0x2e61990usize)as*mut u8,();
168 )
169 }
170 }
171}
172
173#[cfg(feature = "tm_pro-tmp_textinfo")]
174pub trait ITMP_TextInfoMethods: ITMP_TextInfo {
175 #[doc = "`.ctor()` overload"]
176 fn ctor(self) -> () {
177 unsafe {
178 let __receiver = <TMP_TextInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
179 ::unity::il2cpp_call!((::unity::module_base()+0x2e60910usize)as*mut u8,();
180(TMP_TextInfo)__receiver)
181 }
182 }
183 #[doc = "`.ctor(i32)` overload"]
184 fn ctor_2(self, character_count: impl ::core::convert::Into<i32>) -> () {
185 unsafe {
186 let __receiver = <TMP_TextInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
187 ::unity::il2cpp_call!((::unity::module_base()+0x2e60a80usize)as*mut u8,();
188(TMP_TextInfo)__receiver,(i32)::core::convert::Into::into(character_count))
189 }
190 }
191 #[doc = "`.ctor(crate::tm_pro::tmp_text::TMP_Text)` overload"]
192 fn ctor_3(self, text_component: impl ::core::convert::Into<crate::tm_pro::tmp_text::TMP_Text>) -> () {
193 unsafe {
194 let __receiver = <TMP_TextInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
195 ::unity::il2cpp_call!((::unity::module_base()+0x2e60c00usize)as*mut u8,();
196(TMP_TextInfo)__receiver,(crate::tm_pro::tmp_text::TMP_Text)::core::convert::Into::into(text_component))
197 }
198 }
199 #[doc = "`Clear()` overload"]
200 fn clear(self) -> () {
201 unsafe {
202 let __receiver = <TMP_TextInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
203 ::unity::il2cpp_call!((::unity::module_base()+0x2e60de0usize)as*mut u8,();
204(TMP_TextInfo)__receiver)
205 }
206 }
207 #[doc = "`ClearAllData()` overload"]
208 fn clear_all_data(self) -> () {
209 unsafe {
210 let __receiver = <TMP_TextInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
211 ::unity::il2cpp_call!((::unity::module_base()+0x2e60e50usize)as*mut u8,();
212(TMP_TextInfo)__receiver)
213 }
214 }
215 #[doc = "`ClearMeshInfo(bool)` overload"]
216 fn clear_mesh_info(self, update_mesh: impl ::core::convert::Into<bool>) -> () {
217 unsafe {
218 let __receiver = <TMP_TextInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
219 ::unity::il2cpp_call!((::unity::module_base()+0x2e60fd0usize)as*mut u8,();
220(TMP_TextInfo)__receiver,(bool)::core::convert::Into::into(update_mesh))
221 }
222 }
223 #[doc = "`ClearAllMeshInfo()` overload"]
224 fn clear_all_mesh_info(self) -> () {
225 unsafe {
226 let __receiver = <TMP_TextInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
227 ::unity::il2cpp_call!((::unity::module_base()+0x2e61050usize)as*mut u8,();
228(TMP_TextInfo)__receiver)
229 }
230 }
231 #[doc = "`ResetVertexLayout(bool)` overload"]
232 fn reset_vertex_layout(self, is_volumetric: impl ::core::convert::Into<bool>) -> () {
233 unsafe {
234 let __receiver = <TMP_TextInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
235 ::unity::il2cpp_call!((::unity::module_base()+0x2e610d0usize)as*mut u8,();
236(TMP_TextInfo)__receiver,(bool)::core::convert::Into::into(is_volumetric))
237 }
238 }
239 #[doc = "`ClearUnusedVertices(::unity::Array<crate::tm_pro::materialreference::MaterialReference>)` overload"]
240 fn clear_unused_vertices(self, materials: impl ::core::convert::Into<::unity::Array<crate::tm_pro::materialreference::MaterialReference>>) -> () {
241 unsafe {
242 let __receiver = <TMP_TextInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
243 ::unity::il2cpp_call!((::unity::module_base()+0x2e61160usize)as*mut u8,();
244(TMP_TextInfo)__receiver,(::unity::Array<crate::tm_pro::materialreference::MaterialReference>)::core::convert::Into::into(materials))
245 }
246 }
247 #[doc = "`ClearLineInfo()` overload"]
248 fn clear_line_info(self) -> () {
249 unsafe {
250 let __receiver = <TMP_TextInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
251 ::unity::il2cpp_call!((::unity::module_base()+0x2e611e0usize)as*mut u8,();
252(TMP_TextInfo)__receiver)
253 }
254 }
255 #[doc = "`ClearPageInfo()` overload"]
256 fn clear_page_info(self) -> () {
257 unsafe {
258 let __receiver = <TMP_TextInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
259 ::unity::il2cpp_call!((::unity::module_base()+0x2e61440usize)as*mut u8,();
260(TMP_TextInfo)__receiver)
261 }
262 }
263 #[doc = "`CopyMeshInfoVertexData()` overload"]
264 fn copy_mesh_info_vertex_data(self) -> ::unity::Array<crate::tm_pro::tmp_meshinfo::TMP_MeshInfo> {
265 unsafe {
266 let __receiver = <TMP_TextInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
267 ::unity::il2cpp_call!((::unity::module_base()+0x2e61590usize)as*mut u8, ::unity::Array<crate::tm_pro::tmp_meshinfo::TMP_MeshInfo> ;
268(TMP_TextInfo)__receiver)
269 }
270 }
271}
272
273#[cfg(feature = "tm_pro-tmp_textinfo")]
274impl<__T: ITMP_TextInfo> ITMP_TextInfoMethods for __T {}
275
276#[cfg(feature = "tm_pro-tmp_textinfo")]
277impl TMP_TextInfo {
278 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
279 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
280 }
281
282 pub fn ctor_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
283 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
284 }
285
286 pub fn ctor_3_method_info() -> &'static ::unity::il2cpp::MethodInfo {
287 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
288 }
289
290 pub fn clear_method_info() -> &'static ::unity::il2cpp::MethodInfo {
291 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
292 }
293
294 pub fn clear_all_data_method_info() -> &'static ::unity::il2cpp::MethodInfo {
295 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
296 }
297
298 pub fn clear_mesh_info_method_info() -> &'static ::unity::il2cpp::MethodInfo {
299 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
300 }
301
302 pub fn clear_all_mesh_info_method_info() -> &'static ::unity::il2cpp::MethodInfo {
303 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
304 }
305
306 pub fn reset_vertex_layout_method_info() -> &'static ::unity::il2cpp::MethodInfo {
307 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
308 }
309
310 pub fn clear_unused_vertices_method_info() -> &'static ::unity::il2cpp::MethodInfo {
311 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
312 }
313
314 pub fn clear_line_info_method_info() -> &'static ::unity::il2cpp::MethodInfo {
315 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
316 }
317
318 pub fn clear_page_info_method_info() -> &'static ::unity::il2cpp::MethodInfo {
319 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
320 }
321
322 pub fn copy_mesh_info_vertex_data_method_info() -> &'static ::unity::il2cpp::MethodInfo {
323 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
324 }
325
326 pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
327 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
328 }
329}
330
331#[cfg(feature = "tm_pro-tmp_textinfo")]
332impl TMP_TextInfo {
333 #[doc = "`.ctor()` — no args"]
334 pub fn new() -> Self {
335 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
336 panic!(
337 "{}
338::{}
339 failed to instantiate",
340 ::core::stringify!(TMP_TextInfo),
341 ::core::stringify!(new),
342 )
343 });
344 <Self as ITMP_TextInfoMethods>::ctor(this);
345 this
346 }
347
348 #[doc = "`.ctor(i32)` — overload selector"]
349 pub fn new_2(character_count: i32) -> Self {
350 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
351 panic!(
352 "{}
353::{}
354 failed to instantiate",
355 ::core::stringify!(TMP_TextInfo),
356 ::core::stringify!(new_2),
357 )
358 });
359 <Self as ITMP_TextInfoMethods>::ctor_2(this, character_count);
360 this
361 }
362
363 #[doc = "`.ctor(crate::tm_pro::tmp_text::TMP_Text)` — overload selector"]
364 pub fn new_3(text_component: crate::tm_pro::tmp_text::TMP_Text) -> Self {
365 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
366 panic!(
367 "{}
368::{}
369 failed to instantiate",
370 ::core::stringify!(TMP_TextInfo),
371 ::core::stringify!(new_3),
372 )
373 });
374 <Self as ITMP_TextInfoMethods>::ctor_3(this, text_component);
375 this
376 }
377}
378
379#[cfg(feature = "tm_pro-tmp_textinfo")]
380#[doc(hidden)]
381pub mod prelude {
382 pub use super::{ITMP_TextInfo, ITMP_TextInfoMethods, TMP_TextInfo};
383 pub use crate::system::object::IObject;
384 #[cfg(feature = "system-object")]
385 pub use crate::system::object::IObjectMethods;
386}