engage/generated/unity_engine/
addcomponentmenu.rs1#[cfg(feature = "unity_engine-addcomponentmenu-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8
9 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/addcomponentmenu/AddComponentMenu.md"))]
10 #[::unity::class(namespace = "UnityEngine", name = "AddComponentMenu")]
11 pub struct AddComponentMenu {
12 #[offset(16)]
13 #[rename(name = "m_AddComponentMenu")]
14 pub m_add_component_menu: ::unity::Il2CppString,
15 #[offset(24)]
16 #[rename(name = "m_Ordering")]
17 pub m_ordering: i32,
18 }
19}
20
21#[cfg(feature = "unity_engine-addcomponentmenu-types")]
22pub use __types::*;
23
24#[cfg(feature = "unity_engine-addcomponentmenu")]
25pub trait IAddComponentMenuMethods: IAddComponentMenu {
26 #[doc = "`.ctor(::unity::Il2CppString)` overload"]
27 fn ctor(self, menu_name: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
28 unsafe {
29 let __receiver = <AddComponentMenu as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
30 ::unity::il2cpp_call!((::unity::module_base()+0x2c34870usize)as*mut u8,();
31(AddComponentMenu)__receiver,(::unity::Il2CppString)::core::convert::Into::into(menu_name))
32 }
33 }
34 #[doc = "`.ctor(::unity::Il2CppString, i32)` overload"]
35 fn ctor_2(self, menu_name: impl ::core::convert::Into<::unity::Il2CppString>, order: impl ::core::convert::Into<i32>) -> () {
36 unsafe {
37 let __receiver = <AddComponentMenu as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
38 ::unity::il2cpp_call!((::unity::module_base()+0x2c348b0usize)as*mut u8,();
39(AddComponentMenu)__receiver,(::unity::Il2CppString)::core::convert::Into::into(menu_name),(i32)::core::convert::Into::into(order))
40 }
41 }
42}
43
44#[cfg(feature = "unity_engine-addcomponentmenu")]
45impl<__T: IAddComponentMenu> IAddComponentMenuMethods for __T {}
46
47#[cfg(feature = "unity_engine-addcomponentmenu")]
48impl AddComponentMenu {
49 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
50 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
51 }
52
53 pub fn ctor_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
54 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
55 }
56}
57
58#[cfg(feature = "unity_engine-addcomponentmenu")]
59impl AddComponentMenu {
60 #[doc = "`.ctor(::unity::Il2CppString)` — overload selector"]
61 pub fn new(menu_name: ::unity::Il2CppString) -> Self {
62 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
63 panic!(
64 "{}
65::{}
66 failed to instantiate",
67 ::core::stringify!(AddComponentMenu),
68 ::core::stringify!(new),
69 )
70 });
71 <Self as IAddComponentMenuMethods>::ctor(this, menu_name);
72 this
73 }
74
75 #[doc = "`.ctor(::unity::Il2CppString, i32)` — overload selector"]
76 pub fn new_2(menu_name: ::unity::Il2CppString, order: i32) -> Self {
77 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
78 panic!(
79 "{}
80::{}
81 failed to instantiate",
82 ::core::stringify!(AddComponentMenu),
83 ::core::stringify!(new_2),
84 )
85 });
86 <Self as IAddComponentMenuMethods>::ctor_2(this, menu_name, order);
87 this
88 }
89}
90
91#[cfg(feature = "unity_engine-addcomponentmenu")]
92#[doc(hidden)]
93pub mod prelude {
94 pub use super::{AddComponentMenu, IAddComponentMenu, IAddComponentMenuMethods};
95}