engage/generated/unity_engine/ui/
mask.rs1#[cfg(feature = "unity_engine-ui-mask-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::{
9 system::object::{IObject, Object},
10 unity_engine::{
11 behaviour::{Behaviour, IBehaviour},
12 component::{Component, IComponent},
13 event_systems::uibehaviour::{IUIBehaviour, UIBehaviour},
14 monobehaviour::{IMonoBehaviour, MonoBehaviour},
15 object_2::{IObject_2, Object_2},
16 },
17 };
18
19 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/ui/mask/Mask.md"))]
20 #[::unity::class(namespace = "UnityEngine.UI", name = "Mask")]
21 #[parent(crate::unity_engine::event_systems::uibehaviour::UIBehaviour)]
22 pub struct Mask {
23 #[offset(24)]
24 #[rename(name = "m_RectTransform")]
25 pub m_rect_transform: crate::unity_engine::recttransform::RectTransform,
26 #[offset(32)]
27 #[rename(name = "m_ShowMaskGraphic")]
28 pub m_show_mask_graphic: bool,
29 #[offset(40)]
30 #[rename(name = "m_Graphic")]
31 pub m_graphic: crate::unity_engine::ui::graphic::Graphic,
32 #[offset(48)]
33 #[rename(name = "m_MaskMaterial")]
34 pub m_mask_material: crate::unity_engine::material::Material,
35 #[offset(56)]
36 #[rename(name = "m_UnmaskMaterial")]
37 pub m_unmask_material: crate::unity_engine::material::Material,
38 }
39}
40
41#[cfg(feature = "unity_engine-ui-mask-types")]
42pub use __types::*;
43
44#[cfg(feature = "unity_engine-ui-mask")]
45pub trait IMaskMethods: IMask {
46 #[doc = "`get_rectTransform()` overload"]
47 fn get_rect_transform(self) -> crate::unity_engine::recttransform::RectTransform {
48 unsafe {
49 let __receiver = <Mask as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
50 ::unity::il2cpp_call!((::unity::module_base()+0x3719f00usize)as*mut u8,crate::unity_engine::recttransform::RectTransform;
51(Mask)__receiver)
52 }
53 }
54 #[doc = "`get_showMaskGraphic()` overload"]
55 fn get_show_mask_graphic(self) -> bool {
56 unsafe {
57 let __receiver = <Mask as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
58 ::unity::il2cpp_call!((::unity::module_base()+0x3719f80usize)as*mut u8,bool;
59(Mask)__receiver)
60 }
61 }
62 #[doc = "`set_showMaskGraphic(bool)` overload"]
63 fn set_show_mask_graphic(self, value: impl ::core::convert::Into<bool>) -> () {
64 unsafe {
65 let __receiver = <Mask as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
66 ::unity::il2cpp_call!((::unity::module_base()+0x3719f90usize)as*mut u8,();
67(Mask)__receiver,(bool)::core::convert::Into::into(value))
68 }
69 }
70 #[doc = "`get_graphic()` overload"]
71 fn get_graphic(self) -> crate::unity_engine::ui::graphic::Graphic {
72 unsafe {
73 let __receiver = <Mask as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
74 ::unity::il2cpp_call!((::unity::module_base()+0x371a0f0usize)as*mut u8,crate::unity_engine::ui::graphic::Graphic;
75(Mask)__receiver)
76 }
77 }
78 #[doc = "`.ctor()` overload"]
79 fn ctor(self) -> () {
80 unsafe {
81 let __receiver = <Mask as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
82 ::unity::il2cpp_call!((::unity::module_base()+0x371a170usize)as*mut u8,();
83(Mask)__receiver)
84 }
85 }
86 #[doc = "`MaskEnabled()` overload"]
87 fn mask_enabled(self) -> bool {
88 unsafe {
89 let __receiver = <Mask as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
90 {
91 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
92 let __vi = *__vt.get(19usize).unwrap_or_else(|| {
93 panic!(
94 "unity: virtual slot {}
95 out of range (vtable len {}
96) on the runtime class behind {}
97 (method `{}
98`)",
99 19usize,
100 __vt.len(),
101 <Mask as ::unity::ClassIdentity>::NAME,
102 "MaskEnabled",
103 )
104 });
105 let __inner: extern "C" fn(Mask, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
106 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
107 __inner(__receiver, __mi)
108 }
109 }
110 }
111 #[doc = "`OnSiblingGraphicEnabledDisabled()` overload"]
112 fn on_sibling_graphic_enabled_disabled(self) -> () {
113 unsafe {
114 let __receiver = <Mask as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
115 {
116 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
117 let __vi = *__vt.get(20usize).unwrap_or_else(|| {
118 panic!(
119 "unity: virtual slot {}
120 out of range (vtable len {}
121) on the runtime class behind {}
122 (method `{}
123`)",
124 20usize,
125 __vt.len(),
126 <Mask as ::unity::ClassIdentity>::NAME,
127 "OnSiblingGraphicEnabledDisabled",
128 )
129 });
130 let __inner: extern "C" fn(Mask, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
131 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
132 __inner(__receiver, __mi)
133 }
134 }
135 }
136 #[doc = "`OnEnable()` overload"]
137 fn on_enable(self) -> () {
138 unsafe {
139 let __receiver = <Mask as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
140 {
141 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
142 let __vi = *__vt.get(5usize).unwrap_or_else(|| {
143 panic!(
144 "unity: virtual slot {}
145 out of range (vtable len {}
146) on the runtime class behind {}
147 (method `{}
148`)",
149 5usize,
150 __vt.len(),
151 <Mask as ::unity::ClassIdentity>::NAME,
152 "OnEnable",
153 )
154 });
155 let __inner: extern "C" fn(Mask, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
156 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
157 __inner(__receiver, __mi)
158 }
159 }
160 }
161 #[doc = "`OnDisable()` overload"]
162 fn on_disable(self) -> () {
163 unsafe {
164 let __receiver = <Mask as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
165 {
166 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
167 let __vi = *__vt.get(7usize).unwrap_or_else(|| {
168 panic!(
169 "unity: virtual slot {}
170 out of range (vtable len {}
171) on the runtime class behind {}
172 (method `{}
173`)",
174 7usize,
175 __vt.len(),
176 <Mask as ::unity::ClassIdentity>::NAME,
177 "OnDisable",
178 )
179 });
180 let __inner: extern "C" fn(Mask, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
181 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
182 __inner(__receiver, __mi)
183 }
184 }
185 }
186 #[doc = "`IsRaycastLocationValid(crate::unity_engine::vector2::Vector2, crate::unity_engine::camera::Camera)` overload"]
187 fn is_raycast_location_valid(
188 self,
189 sp: impl ::core::convert::Into<crate::unity_engine::vector2::Vector2>,
190 event_camera: impl ::core::convert::Into<crate::unity_engine::camera::Camera>,
191 ) -> bool {
192 unsafe {
193 let __receiver = <Mask as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
194 {
195 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
196 let __vi = *__vt.get(21usize).unwrap_or_else(|| {
197 panic!(
198 "unity: virtual slot {}
199 out of range (vtable len {}
200) on the runtime class behind {}
201 (method `{}
202`)",
203 21usize,
204 __vt.len(),
205 <Mask as ::unity::ClassIdentity>::NAME,
206 "IsRaycastLocationValid",
207 )
208 });
209 let __inner: extern "C" fn(
210 Mask,
211 crate::unity_engine::vector2::Vector2,
212 crate::unity_engine::camera::Camera,
213 ::unity::OptionalMethod,
214 ) -> bool = ::core::mem::transmute(__vi.method_ptr);
215 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
216 __inner(
217 __receiver,
218 ::core::convert::Into::into(sp),
219 ::core::convert::Into::into(event_camera),
220 __mi,
221 )
222 }
223 }
224 }
225 #[doc = "`GetModifiedMaterial(crate::unity_engine::material::Material)` overload"]
226 fn get_modified_material(
227 self,
228 base_material: impl ::core::convert::Into<crate::unity_engine::material::Material>,
229 ) -> crate::unity_engine::material::Material {
230 unsafe {
231 let __receiver = <Mask as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
232 {
233 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
234 let __vi = *__vt.get(22usize).unwrap_or_else(|| {
235 panic!(
236 "unity: virtual slot {}
237 out of range (vtable len {}
238) on the runtime class behind {}
239 (method `{}
240`)",
241 22usize,
242 __vt.len(),
243 <Mask as ::unity::ClassIdentity>::NAME,
244 "GetModifiedMaterial",
245 )
246 });
247 let __inner: extern "C" fn(
248 Mask,
249 crate::unity_engine::material::Material,
250 ::unity::OptionalMethod,
251 ) -> crate::unity_engine::material::Material = ::core::mem::transmute(__vi.method_ptr);
252 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
253 __inner(__receiver, ::core::convert::Into::into(base_material), __mi)
254 }
255 }
256 }
257}
258
259#[cfg(feature = "unity_engine-ui-mask")]
260impl<__T: IMask> IMaskMethods for __T {}
261
262#[cfg(feature = "unity_engine-ui-mask")]
263impl Mask {
264 pub fn get_rect_transform_method_info() -> &'static ::unity::il2cpp::MethodInfo {
265 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
266 }
267
268 pub fn get_show_mask_graphic_method_info() -> &'static ::unity::il2cpp::MethodInfo {
269 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
270 }
271
272 pub fn set_show_mask_graphic_method_info() -> &'static ::unity::il2cpp::MethodInfo {
273 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
274 }
275
276 pub fn get_graphic_method_info() -> &'static ::unity::il2cpp::MethodInfo {
277 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
278 }
279
280 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
281 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
282 }
283
284 pub fn mask_enabled_method_info() -> &'static ::unity::il2cpp::MethodInfo {
285 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
286 }
287
288 pub fn on_sibling_graphic_enabled_disabled_method_info() -> &'static ::unity::il2cpp::MethodInfo {
289 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
290 }
291
292 pub fn on_enable_method_info() -> &'static ::unity::il2cpp::MethodInfo {
293 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
294 }
295
296 pub fn on_disable_method_info() -> &'static ::unity::il2cpp::MethodInfo {
297 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
298 }
299
300 pub fn is_raycast_location_valid_method_info() -> &'static ::unity::il2cpp::MethodInfo {
301 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
302 }
303
304 pub fn get_modified_material_method_info() -> &'static ::unity::il2cpp::MethodInfo {
305 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
306 }
307}
308
309#[cfg(feature = "unity_engine-ui-mask")]
310impl Mask {
311 #[doc = "Direct (non-virtual) call to `Mask`'s own `MaskEnabled`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
312 pub unsafe fn mask_enabled(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
313 let __mi = Self::mask_enabled_method_info();
314 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
315 __inner(this.into(), ::core::option::Option::None)
316 }
317
318 #[doc = "Direct (non-virtual) call to `Mask`'s own `OnSiblingGraphicEnabledDisabled`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
319 pub unsafe fn on_sibling_graphic_enabled_disabled(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
320 let __mi = Self::on_sibling_graphic_enabled_disabled_method_info();
321 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
322 __inner(this.into(), ::core::option::Option::None)
323 }
324
325 #[doc = "Direct (non-virtual) call to `Mask`'s own `OnEnable`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
326 pub unsafe fn on_enable(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
327 let __mi = Self::on_enable_method_info();
328 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
329 __inner(this.into(), ::core::option::Option::None)
330 }
331
332 #[doc = "Direct (non-virtual) call to `Mask`'s own `OnDisable`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
333 pub unsafe fn on_disable(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
334 let __mi = Self::on_disable_method_info();
335 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
336 __inner(this.into(), ::core::option::Option::None)
337 }
338
339 #[doc = "Direct (non-virtual) call to `Mask`'s own `IsRaycastLocationValid`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
340 pub unsafe fn is_raycast_location_valid(
341 this: impl ::core::convert::Into<::unity::IlInstance>,
342 sp: crate::unity_engine::vector2::Vector2,
343 event_camera: crate::unity_engine::camera::Camera,
344 ) -> bool {
345 let __mi = Self::is_raycast_location_valid_method_info();
346 let __inner: extern "C" fn(
347 ::unity::IlInstance,
348 crate::unity_engine::vector2::Vector2,
349 crate::unity_engine::camera::Camera,
350 ::unity::OptionalMethod,
351 ) -> bool = ::core::mem::transmute(__mi.method_ptr);
352 __inner(this.into(), sp, event_camera, ::core::option::Option::None)
353 }
354
355 #[doc = "Direct (non-virtual) call to `Mask`'s own `GetModifiedMaterial`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
356 pub unsafe fn get_modified_material(
357 this: impl ::core::convert::Into<::unity::IlInstance>,
358 base_material: crate::unity_engine::material::Material,
359 ) -> crate::unity_engine::material::Material {
360 let __mi = Self::get_modified_material_method_info();
361 let __inner: extern "C" fn(
362 ::unity::IlInstance,
363 crate::unity_engine::material::Material,
364 ::unity::OptionalMethod,
365 ) -> crate::unity_engine::material::Material = ::core::mem::transmute(__mi.method_ptr);
366 __inner(this.into(), base_material, ::core::option::Option::None)
367 }
368}
369
370#[cfg(feature = "unity_engine-ui-mask")]
371impl Mask {
372 #[doc = "`.ctor()` — no args"]
373 pub fn new() -> Self {
374 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
375 panic!(
376 "{}
377::{}
378 failed to instantiate",
379 ::core::stringify!(Mask),
380 ::core::stringify!(new),
381 )
382 });
383 <Self as IMaskMethods>::ctor(this);
384 this
385 }
386}
387
388#[cfg(feature = "unity_engine-ui-mask")]
389#[doc(hidden)]
390pub mod prelude {
391 pub use super::{IMask, IMaskMethods, Mask};
392 #[cfg(feature = "system-object")]
393 pub use crate::system::object::IObjectMethods;
394 #[cfg(feature = "unity_engine-behaviour")]
395 pub use crate::unity_engine::behaviour::IBehaviourMethods;
396 #[cfg(feature = "unity_engine-component")]
397 pub use crate::unity_engine::component::IComponentMethods;
398 #[cfg(feature = "unity_engine-event_systems-uibehaviour")]
399 pub use crate::unity_engine::event_systems::uibehaviour::IUIBehaviourMethods;
400 #[cfg(feature = "unity_engine-monobehaviour")]
401 pub use crate::unity_engine::monobehaviour::IMonoBehaviourMethods;
402 #[cfg(feature = "unity_engine-object_2")]
403 pub use crate::unity_engine::object_2::IObject_2Methods;
404 pub use crate::{
405 system::object::IObject,
406 unity_engine::{
407 behaviour::IBehaviour, component::IComponent, event_systems::uibehaviour::IUIBehaviour, monobehaviour::IMonoBehaviour,
408 object_2::IObject_2,
409 },
410 };
411}