1#[cfg(feature = "unity_engine-ui-toggle-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::{
9 system::{
10 object::{IObject, Object},
11 r#enum::{Enum, IEnum},
12 valuetype::{IValueType, ValueType},
13 },
14 unity_engine::{
15 behaviour::{Behaviour, IBehaviour},
16 component::{Component, IComponent},
17 event_systems::uibehaviour::{IUIBehaviour, UIBehaviour},
18 events::{
19 unityevent_1::{IUnityEvent_1, UnityEvent_1},
20 unityeventbase::{IUnityEventBase, UnityEventBase},
21 },
22 monobehaviour::{IMonoBehaviour, MonoBehaviour},
23 object_2::{IObject_2, Object_2},
24 ui::selectable::{ISelectable, Selectable},
25 },
26 };
27
28 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/ui/toggle/Toggle_ToggleTransition.md"))]
29 #[repr(C)]
30 #[derive(::core::clone::Clone, ::core::marker::Copy, ::core::fmt::Debug, ::core::cmp::PartialEq, ::core::cmp::Eq)]
31 pub struct Toggle_ToggleTransition {
32 pub value: i32,
33 }
34 impl ::unity::ClassIdentity for Toggle_ToggleTransition {
35 const NAME: &'static str = "Toggle.ToggleTransition";
36 const NAMESPACE: &'static str = "UnityEngine.UI";
37
38 fn class() -> ::unity::Class {
39 static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
40 *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
41 }
42 }
43 impl ::unity::IlType for Toggle_ToggleTransition {
44 fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
45 &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
46 }
47 }
48 impl Toggle_ToggleTransition {
49 pub fn none() -> Self {
50 Self { value: 0 }
51 }
52
53 pub fn fade() -> Self {
54 Self { value: 1 }
55 }
56 }
57
58 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/ui/toggle/Toggle.md"))]
59 #[::unity::class(namespace = "UnityEngine.UI", name = "Toggle")]
60 #[parent(crate::unity_engine::ui::selectable::Selectable)]
61 pub struct Toggle {
62 #[offset(248)]
63 #[rename(name = "toggleTransition")]
64 pub toggle_transition: crate::unity_engine::ui::toggle::Toggle_ToggleTransition,
65 #[offset(256)]
66 #[rename(name = "graphic")]
67 pub graphic: crate::unity_engine::ui::graphic::Graphic,
68 #[offset(264)]
69 #[rename(name = "m_Group")]
70 pub m_group: crate::unity_engine::ui::togglegroup::ToggleGroup,
71 #[offset(272)]
72 #[rename(name = "onValueChanged")]
73 pub on_value_changed: crate::unity_engine::ui::toggle::Toggle_ToggleEvent,
74 #[offset(280)]
75 #[rename(name = "m_IsOn")]
76 pub m_is_on: bool,
77 }
78
79 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/ui/toggle/Toggle_ToggleEvent.md"))]
80 #[::unity::class(namespace = "UnityEngine.UI", name = "Toggle.ToggleEvent")]
81 #[parent(crate::unity_engine::events::unityevent_1::UnityEvent_1<bool>)]
82 pub struct Toggle_ToggleEvent {}
83}
84
85#[cfg(feature = "unity_engine-ui-toggle-types")]
86pub use __types::*;
87
88#[cfg(feature = "unity_engine-ui-toggle")]
89pub trait IToggleMethods: IToggle {
90 #[doc = "`get_group()` overload"]
91 fn get_group(self) -> crate::unity_engine::ui::togglegroup::ToggleGroup {
92 unsafe {
93 let __receiver = <Toggle as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
94 ::unity::il2cpp_call!((::unity::module_base()+0x3c07c90usize)as*mut u8,crate::unity_engine::ui::togglegroup::ToggleGroup;
95(Toggle)__receiver)
96 }
97 }
98 #[doc = "`set_group(crate::unity_engine::ui::togglegroup::ToggleGroup)` overload"]
99 fn set_group(self, value: impl ::core::convert::Into<crate::unity_engine::ui::togglegroup::ToggleGroup>) -> () {
100 unsafe {
101 let __receiver = <Toggle as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
102 ::unity::il2cpp_call!((::unity::module_base()+0x3c07ca0usize)as*mut u8,();
103(Toggle)__receiver,(crate::unity_engine::ui::togglegroup::ToggleGroup)::core::convert::Into::into(value))
104 }
105 }
106 #[doc = "`.ctor()` overload"]
107 fn ctor(self) -> () {
108 unsafe {
109 let __receiver = <Toggle as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
110 ::unity::il2cpp_call!((::unity::module_base()+0x3c08050usize)as*mut u8,();
111(Toggle)__receiver)
112 }
113 }
114 #[doc = "`Rebuild(crate::unity_engine::ui::canvasupdate::CanvasUpdate)` overload"]
115 fn rebuild(self, executing: impl ::core::convert::Into<crate::unity_engine::ui::canvasupdate::CanvasUpdate>) -> () {
116 unsafe {
117 let __receiver = <Toggle as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
118 {
119 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
120 let __vi = *__vt.get(46usize).unwrap_or_else(|| {
121 panic!(
122 "unity: virtual slot {}
123 out of range (vtable len {}
124) on the runtime class behind {}
125 (method `{}
126`)",
127 46usize,
128 __vt.len(),
129 <Toggle as ::unity::ClassIdentity>::NAME,
130 "Rebuild",
131 )
132 });
133 let __inner: extern "C" fn(Toggle, crate::unity_engine::ui::canvasupdate::CanvasUpdate, ::unity::OptionalMethod) -> () =
134 ::core::mem::transmute(__vi.method_ptr);
135 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
136 __inner(__receiver, ::core::convert::Into::into(executing), __mi)
137 }
138 }
139 }
140 #[doc = "`LayoutComplete()` overload"]
141 fn layout_complete(self) -> () {
142 unsafe {
143 let __receiver = <Toggle as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
144 {
145 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
146 let __vi = *__vt.get(47usize).unwrap_or_else(|| {
147 panic!(
148 "unity: virtual slot {}
149 out of range (vtable len {}
150) on the runtime class behind {}
151 (method `{}
152`)",
153 47usize,
154 __vt.len(),
155 <Toggle as ::unity::ClassIdentity>::NAME,
156 "LayoutComplete",
157 )
158 });
159 let __inner: extern "C" fn(Toggle, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
160 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
161 __inner(__receiver, __mi)
162 }
163 }
164 }
165 #[doc = "`GraphicUpdateComplete()` overload"]
166 fn graphic_update_complete(self) -> () {
167 unsafe {
168 let __receiver = <Toggle as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
169 {
170 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
171 let __vi = *__vt.get(48usize).unwrap_or_else(|| {
172 panic!(
173 "unity: virtual slot {}
174 out of range (vtable len {}
175) on the runtime class behind {}
176 (method `{}
177`)",
178 48usize,
179 __vt.len(),
180 <Toggle as ::unity::ClassIdentity>::NAME,
181 "GraphicUpdateComplete",
182 )
183 });
184 let __inner: extern "C" fn(Toggle, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
185 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
186 __inner(__receiver, __mi)
187 }
188 }
189 }
190 #[doc = "`OnDestroy()` overload"]
191 fn on_destroy(self) -> () {
192 unsafe {
193 let __receiver = <Toggle 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(8usize).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 8usize,
204 __vt.len(),
205 <Toggle as ::unity::ClassIdentity>::NAME,
206 "OnDestroy",
207 )
208 });
209 let __inner: extern "C" fn(Toggle, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
210 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
211 __inner(__receiver, __mi)
212 }
213 }
214 }
215 #[doc = "`OnEnable()` overload"]
216 fn on_enable(self) -> () {
217 unsafe {
218 let __receiver = <Toggle as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
219 {
220 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
221 let __vi = *__vt.get(5usize).unwrap_or_else(|| {
222 panic!(
223 "unity: virtual slot {}
224 out of range (vtable len {}
225) on the runtime class behind {}
226 (method `{}
227`)",
228 5usize,
229 __vt.len(),
230 <Toggle as ::unity::ClassIdentity>::NAME,
231 "OnEnable",
232 )
233 });
234 let __inner: extern "C" fn(Toggle, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
235 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
236 __inner(__receiver, __mi)
237 }
238 }
239 }
240 #[doc = "`OnDisable()` overload"]
241 fn on_disable(self) -> () {
242 unsafe {
243 let __receiver = <Toggle as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
244 {
245 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
246 let __vi = *__vt.get(7usize).unwrap_or_else(|| {
247 panic!(
248 "unity: virtual slot {}
249 out of range (vtable len {}
250) on the runtime class behind {}
251 (method `{}
252`)",
253 7usize,
254 __vt.len(),
255 <Toggle as ::unity::ClassIdentity>::NAME,
256 "OnDisable",
257 )
258 });
259 let __inner: extern "C" fn(Toggle, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
260 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
261 __inner(__receiver, __mi)
262 }
263 }
264 }
265 #[doc = "`OnDidApplyAnimationProperties()` overload"]
266 fn on_did_apply_animation_properties(self) -> () {
267 unsafe {
268 let __receiver = <Toggle as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
269 {
270 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
271 let __vi = *__vt.get(13usize).unwrap_or_else(|| {
272 panic!(
273 "unity: virtual slot {}
274 out of range (vtable len {}
275) on the runtime class behind {}
276 (method `{}
277`)",
278 13usize,
279 __vt.len(),
280 <Toggle as ::unity::ClassIdentity>::NAME,
281 "OnDidApplyAnimationProperties",
282 )
283 });
284 let __inner: extern "C" fn(Toggle, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
285 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
286 __inner(__receiver, __mi)
287 }
288 }
289 }
290 #[doc = "`SetToggleGroup(crate::unity_engine::ui::togglegroup::ToggleGroup, bool)` overload"]
291 fn set_toggle_group(
292 self,
293 new_group: impl ::core::convert::Into<crate::unity_engine::ui::togglegroup::ToggleGroup>,
294 set_member_value: impl ::core::convert::Into<bool>,
295 ) -> () {
296 unsafe {
297 let __receiver = <Toggle as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
298 ::unity::il2cpp_call!((::unity::module_base()+0x3c07d60usize)as*mut u8,();
299(Toggle)__receiver,(crate::unity_engine::ui::togglegroup::ToggleGroup)::core::convert::Into::into(new_group),(bool)::core::convert::Into::into(set_member_value))
300 }
301 }
302 #[doc = "`get_isOn()` overload"]
303 fn get_is_on(self) -> bool {
304 unsafe {
305 let __receiver = <Toggle as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
306 ::unity::il2cpp_call!((::unity::module_base()+0x3c08d30usize)as*mut u8,bool;
307(Toggle)__receiver)
308 }
309 }
310 #[doc = "`set_isOn(bool)` overload"]
311 fn set_is_on(self, value: impl ::core::convert::Into<bool>) -> () {
312 unsafe {
313 let __receiver = <Toggle as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
314 ::unity::il2cpp_call!((::unity::module_base()+0x3c08d40usize)as*mut u8,();
315(Toggle)__receiver,(bool)::core::convert::Into::into(value))
316 }
317 }
318 #[doc = "`SetIsOnWithoutNotify(bool)` overload"]
319 fn set_is_on_without_notify(self, value: impl ::core::convert::Into<bool>) -> () {
320 unsafe {
321 let __receiver = <Toggle as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
322 ::unity::il2cpp_call!((::unity::module_base()+0x3c08d50usize)as*mut u8,();
323(Toggle)__receiver,(bool)::core::convert::Into::into(value))
324 }
325 }
326 #[doc = "`Set(bool, bool)` overload"]
327 fn set(self, value: impl ::core::convert::Into<bool>, send_callback: impl ::core::convert::Into<bool>) -> () {
328 unsafe {
329 let __receiver = <Toggle as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
330 ::unity::il2cpp_call!((::unity::module_base()+0x3c08820usize)as*mut u8,();
331(Toggle)__receiver,(bool)::core::convert::Into::into(value),(bool)::core::convert::Into::into(send_callback))
332 }
333 }
334 #[doc = "`PlayEffect(bool)` overload"]
335 fn play_effect(self, instant: impl ::core::convert::Into<bool>) -> () {
336 unsafe {
337 let __receiver = <Toggle as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
338 ::unity::il2cpp_call!((::unity::module_base()+0x3c07f80usize)as*mut u8,();
339(Toggle)__receiver,(bool)::core::convert::Into::into(instant))
340 }
341 }
342 #[doc = "`Start()` overload"]
343 fn start(self) -> () {
344 unsafe {
345 let __receiver = <Toggle as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
346 {
347 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
348 let __vi = *__vt.get(6usize).unwrap_or_else(|| {
349 panic!(
350 "unity: virtual slot {}
351 out of range (vtable len {}
352) on the runtime class behind {}
353 (method `{}
354`)",
355 6usize,
356 __vt.len(),
357 <Toggle as ::unity::ClassIdentity>::NAME,
358 "Start",
359 )
360 });
361 let __inner: extern "C" fn(Toggle, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
362 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
363 __inner(__receiver, __mi)
364 }
365 }
366 }
367 #[doc = "`InternalToggle()` overload"]
368 fn internal_toggle(self) -> () {
369 unsafe {
370 let __receiver = <Toggle as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
371 ::unity::il2cpp_call!((::unity::module_base()+0x3c08f90usize)as*mut u8,();
372(Toggle)__receiver)
373 }
374 }
375 #[doc = "`OnPointerClick(crate::unity_engine::event_systems::pointereventdata::PointerEventData)` overload"]
376 fn on_pointer_click(self, event_data: impl ::core::convert::Into<crate::unity_engine::event_systems::pointereventdata::PointerEventData>) -> () {
377 unsafe {
378 let __receiver = <Toggle as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
379 {
380 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
381 let __vi = *__vt.get(49usize).unwrap_or_else(|| {
382 panic!(
383 "unity: virtual slot {}
384 out of range (vtable len {}
385) on the runtime class behind {}
386 (method `{}
387`)",
388 49usize,
389 __vt.len(),
390 <Toggle as ::unity::ClassIdentity>::NAME,
391 "OnPointerClick",
392 )
393 });
394 let __inner: extern "C" fn(
395 Toggle,
396 crate::unity_engine::event_systems::pointereventdata::PointerEventData,
397 ::unity::OptionalMethod,
398 ) -> () = ::core::mem::transmute(__vi.method_ptr);
399 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
400 __inner(__receiver, ::core::convert::Into::into(event_data), __mi)
401 }
402 }
403 }
404 #[doc = "`OnSubmit(crate::unity_engine::event_systems::baseeventdata::BaseEventData)` overload"]
405 fn on_submit(self, event_data: impl ::core::convert::Into<crate::unity_engine::event_systems::baseeventdata::BaseEventData>) -> () {
406 unsafe {
407 let __receiver = <Toggle as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
408 {
409 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
410 let __vi = *__vt.get(50usize).unwrap_or_else(|| {
411 panic!(
412 "unity: virtual slot {}
413 out of range (vtable len {}
414) on the runtime class behind {}
415 (method `{}
416`)",
417 50usize,
418 __vt.len(),
419 <Toggle as ::unity::ClassIdentity>::NAME,
420 "OnSubmit",
421 )
422 });
423 let __inner: extern "C" fn(Toggle, crate::unity_engine::event_systems::baseeventdata::BaseEventData, ::unity::OptionalMethod) -> () =
424 ::core::mem::transmute(__vi.method_ptr);
425 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
426 __inner(__receiver, ::core::convert::Into::into(event_data), __mi)
427 }
428 }
429 }
430 #[doc = "`UnityEngine.UI.ICanvasElement.get_transform()` overload"]
431 fn unity_engine_ui_i_canvas_element_get_transform(self) -> crate::unity_engine::transform::Transform {
432 unsafe {
433 let __receiver = <Toggle as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
434 {
435 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
436 let __vi = *__vt.get(42usize).unwrap_or_else(|| {
437 panic!(
438 "unity: virtual slot {}
439 out of range (vtable len {}
440) on the runtime class behind {}
441 (method `{}
442`)",
443 42usize,
444 __vt.len(),
445 <Toggle as ::unity::ClassIdentity>::NAME,
446 "UnityEngine.UI.ICanvasElement.get_transform",
447 )
448 });
449 let __inner: extern "C" fn(Toggle, ::unity::OptionalMethod) -> crate::unity_engine::transform::Transform =
450 ::core::mem::transmute(__vi.method_ptr);
451 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
452 __inner(__receiver, __mi)
453 }
454 }
455 }
456}
457
458#[cfg(feature = "unity_engine-ui-toggle")]
459impl<__T: IToggle> IToggleMethods for __T {}
460
461#[cfg(feature = "unity_engine-ui-toggle")]
462impl Toggle {
463 pub fn get_group_method_info() -> &'static ::unity::il2cpp::MethodInfo {
464 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
465 }
466
467 pub fn set_group_method_info() -> &'static ::unity::il2cpp::MethodInfo {
468 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
469 }
470
471 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
472 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
473 }
474
475 pub fn rebuild_method_info() -> &'static ::unity::il2cpp::MethodInfo {
476 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
477 }
478
479 pub fn layout_complete_method_info() -> &'static ::unity::il2cpp::MethodInfo {
480 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
481 }
482
483 pub fn graphic_update_complete_method_info() -> &'static ::unity::il2cpp::MethodInfo {
484 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
485 }
486
487 pub fn on_destroy_method_info() -> &'static ::unity::il2cpp::MethodInfo {
488 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
489 }
490
491 pub fn on_enable_method_info() -> &'static ::unity::il2cpp::MethodInfo {
492 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
493 }
494
495 pub fn on_disable_method_info() -> &'static ::unity::il2cpp::MethodInfo {
496 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
497 }
498
499 pub fn on_did_apply_animation_properties_method_info() -> &'static ::unity::il2cpp::MethodInfo {
500 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
501 }
502
503 pub fn set_toggle_group_method_info() -> &'static ::unity::il2cpp::MethodInfo {
504 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
505 }
506
507 pub fn get_is_on_method_info() -> &'static ::unity::il2cpp::MethodInfo {
508 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
509 }
510
511 pub fn set_is_on_method_info() -> &'static ::unity::il2cpp::MethodInfo {
512 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
513 }
514
515 pub fn set_is_on_without_notify_method_info() -> &'static ::unity::il2cpp::MethodInfo {
516 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
517 }
518
519 pub fn set_method_info() -> &'static ::unity::il2cpp::MethodInfo {
520 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
521 }
522
523 pub fn play_effect_method_info() -> &'static ::unity::il2cpp::MethodInfo {
524 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
525 }
526
527 pub fn start_method_info() -> &'static ::unity::il2cpp::MethodInfo {
528 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[16]
529 }
530
531 pub fn internal_toggle_method_info() -> &'static ::unity::il2cpp::MethodInfo {
532 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[17]
533 }
534
535 pub fn on_pointer_click_method_info() -> &'static ::unity::il2cpp::MethodInfo {
536 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[18]
537 }
538
539 pub fn on_submit_method_info() -> &'static ::unity::il2cpp::MethodInfo {
540 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[19]
541 }
542
543 pub fn unity_engine_ui_i_canvas_element_get_transform_method_info() -> &'static ::unity::il2cpp::MethodInfo {
544 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[20]
545 }
546}
547
548#[cfg(feature = "unity_engine-ui-toggle")]
549impl Toggle {
550 #[doc = "Direct (non-virtual) call to `Toggle`'s own `Rebuild`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
551 pub unsafe fn rebuild(
552 this: impl ::core::convert::Into<::unity::IlInstance>,
553 executing: crate::unity_engine::ui::canvasupdate::CanvasUpdate,
554 ) -> () {
555 let __mi = Self::rebuild_method_info();
556 let __inner: extern "C" fn(::unity::IlInstance, crate::unity_engine::ui::canvasupdate::CanvasUpdate, ::unity::OptionalMethod) -> () =
557 ::core::mem::transmute(__mi.method_ptr);
558 __inner(this.into(), executing, ::core::option::Option::None)
559 }
560
561 #[doc = "Direct (non-virtual) call to `Toggle`'s own `LayoutComplete`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
562 pub unsafe fn layout_complete(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
563 let __mi = Self::layout_complete_method_info();
564 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
565 __inner(this.into(), ::core::option::Option::None)
566 }
567
568 #[doc = "Direct (non-virtual) call to `Toggle`'s own `GraphicUpdateComplete`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
569 pub unsafe fn graphic_update_complete(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
570 let __mi = Self::graphic_update_complete_method_info();
571 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
572 __inner(this.into(), ::core::option::Option::None)
573 }
574
575 #[doc = "Direct (non-virtual) call to `Toggle`'s own `OnDestroy`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
576 pub unsafe fn on_destroy(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
577 let __mi = Self::on_destroy_method_info();
578 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
579 __inner(this.into(), ::core::option::Option::None)
580 }
581
582 #[doc = "Direct (non-virtual) call to `Toggle`'s own `OnEnable`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
583 pub unsafe fn on_enable(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
584 let __mi = Self::on_enable_method_info();
585 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
586 __inner(this.into(), ::core::option::Option::None)
587 }
588
589 #[doc = "Direct (non-virtual) call to `Toggle`'s own `OnDisable`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
590 pub unsafe fn on_disable(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
591 let __mi = Self::on_disable_method_info();
592 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
593 __inner(this.into(), ::core::option::Option::None)
594 }
595
596 #[doc = "Direct (non-virtual) call to `Toggle`'s own `OnDidApplyAnimationProperties`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
597 pub unsafe fn on_did_apply_animation_properties(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
598 let __mi = Self::on_did_apply_animation_properties_method_info();
599 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
600 __inner(this.into(), ::core::option::Option::None)
601 }
602
603 #[doc = "Direct (non-virtual) call to `Toggle`'s own `Start`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
604 pub unsafe fn start(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
605 let __mi = Self::start_method_info();
606 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
607 __inner(this.into(), ::core::option::Option::None)
608 }
609
610 #[doc = "Direct (non-virtual) call to `Toggle`'s own `OnPointerClick`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
611 pub unsafe fn on_pointer_click(
612 this: impl ::core::convert::Into<::unity::IlInstance>,
613 event_data: crate::unity_engine::event_systems::pointereventdata::PointerEventData,
614 ) -> () {
615 let __mi = Self::on_pointer_click_method_info();
616 let __inner: extern "C" fn(
617 ::unity::IlInstance,
618 crate::unity_engine::event_systems::pointereventdata::PointerEventData,
619 ::unity::OptionalMethod,
620 ) -> () = ::core::mem::transmute(__mi.method_ptr);
621 __inner(this.into(), event_data, ::core::option::Option::None)
622 }
623
624 #[doc = "Direct (non-virtual) call to `Toggle`'s own `OnSubmit`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
625 pub unsafe fn on_submit(
626 this: impl ::core::convert::Into<::unity::IlInstance>,
627 event_data: crate::unity_engine::event_systems::baseeventdata::BaseEventData,
628 ) -> () {
629 let __mi = Self::on_submit_method_info();
630 let __inner: extern "C" fn(
631 ::unity::IlInstance,
632 crate::unity_engine::event_systems::baseeventdata::BaseEventData,
633 ::unity::OptionalMethod,
634 ) -> () = ::core::mem::transmute(__mi.method_ptr);
635 __inner(this.into(), event_data, ::core::option::Option::None)
636 }
637
638 #[doc = "Direct (non-virtual) call to `Toggle`'s own `UnityEngine.UI.ICanvasElement.get_transform`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
639 pub unsafe fn unity_engine_ui_i_canvas_element_get_transform(
640 this: impl ::core::convert::Into<::unity::IlInstance>,
641 ) -> crate::unity_engine::transform::Transform {
642 let __mi = Self::unity_engine_ui_i_canvas_element_get_transform_method_info();
643 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::unity_engine::transform::Transform =
644 ::core::mem::transmute(__mi.method_ptr);
645 __inner(this.into(), ::core::option::Option::None)
646 }
647}
648
649#[cfg(feature = "unity_engine-ui-toggle")]
650impl Toggle {
651 #[doc = "`.ctor()` — no args"]
652 pub fn new() -> Self {
653 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
654 panic!(
655 "{}
656::{}
657 failed to instantiate",
658 ::core::stringify!(Toggle),
659 ::core::stringify!(new),
660 )
661 });
662 <Self as IToggleMethods>::ctor(this);
663 this
664 }
665}
666
667#[cfg(feature = "unity_engine-ui-toggle")]
668pub trait IToggle_ToggleEventMethods: IToggle_ToggleEvent {
669 #[doc = "`.ctor()` overload"]
670 fn ctor(self) -> () {
671 unsafe {
672 let __receiver = <Toggle_ToggleEvent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
673 ::unity::il2cpp_call!((::unity::module_base()+0x3c08130usize)as*mut u8,();
674(Toggle_ToggleEvent)__receiver)
675 }
676 }
677}
678
679#[cfg(feature = "unity_engine-ui-toggle")]
680impl<__T: IToggle_ToggleEvent> IToggle_ToggleEventMethods for __T {}
681
682#[cfg(feature = "unity_engine-ui-toggle")]
683impl Toggle_ToggleEvent {
684 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
685 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
686 }
687}
688
689#[cfg(feature = "unity_engine-ui-toggle")]
690impl Toggle_ToggleEvent {
691 #[doc = "`.ctor()` — no args"]
692 pub fn new() -> Self {
693 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
694 panic!(
695 "{}
696::{}
697 failed to instantiate",
698 ::core::stringify!(Toggle_ToggleEvent),
699 ::core::stringify!(new),
700 )
701 });
702 <Self as IToggle_ToggleEventMethods>::ctor(this);
703 this
704 }
705}
706
707#[cfg(feature = "unity_engine-ui-toggle")]
708#[doc(hidden)]
709pub mod prelude {
710 pub use super::{IToggle, IToggleMethods, IToggle_ToggleEvent, IToggle_ToggleEventMethods, Toggle, Toggle_ToggleEvent, Toggle_ToggleTransition};
711 #[cfg(feature = "system-object")]
712 pub use crate::system::object::IObjectMethods;
713 #[cfg(feature = "system-enum")]
714 pub use crate::system::r#enum::IEnumMethods;
715 #[cfg(feature = "system-valuetype")]
716 pub use crate::system::valuetype::IValueTypeMethods;
717 #[cfg(feature = "unity_engine-behaviour")]
718 pub use crate::unity_engine::behaviour::IBehaviourMethods;
719 #[cfg(feature = "unity_engine-component")]
720 pub use crate::unity_engine::component::IComponentMethods;
721 #[cfg(feature = "unity_engine-event_systems-uibehaviour")]
722 pub use crate::unity_engine::event_systems::uibehaviour::IUIBehaviourMethods;
723 #[cfg(feature = "unity_engine-events-unityevent_1")]
724 pub use crate::unity_engine::events::unityevent_1::IUnityEvent_1Methods;
725 #[cfg(feature = "unity_engine-events-unityeventbase")]
726 pub use crate::unity_engine::events::unityeventbase::IUnityEventBaseMethods;
727 #[cfg(feature = "unity_engine-monobehaviour")]
728 pub use crate::unity_engine::monobehaviour::IMonoBehaviourMethods;
729 #[cfg(feature = "unity_engine-object_2")]
730 pub use crate::unity_engine::object_2::IObject_2Methods;
731 #[cfg(feature = "unity_engine-ui-selectable")]
732 pub use crate::unity_engine::ui::selectable::ISelectableMethods;
733 pub use crate::{
734 system::{object::IObject, r#enum::IEnum, valuetype::IValueType},
735 unity_engine::{
736 behaviour::IBehaviour,
737 component::IComponent,
738 event_systems::uibehaviour::IUIBehaviour,
739 events::{unityevent_1::IUnityEvent_1, unityeventbase::IUnityEventBase},
740 monobehaviour::IMonoBehaviour,
741 object_2::IObject_2,
742 ui::selectable::ISelectable,
743 },
744 };
745}