engage/generated/unity_engine/
disallowmultiplecomponent.rs1#[cfg(feature = "unity_engine-disallowmultiplecomponent-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/disallowmultiplecomponent/DisallowMultipleComponent.md"))]
10 #[::unity::class(namespace = "UnityEngine", name = "DisallowMultipleComponent")]
11 pub struct DisallowMultipleComponent {}
12}
13
14#[cfg(feature = "unity_engine-disallowmultiplecomponent-types")]
15pub use __types::*;
16
17#[cfg(feature = "unity_engine-disallowmultiplecomponent")]
18pub trait IDisallowMultipleComponentMethods: IDisallowMultipleComponent {
19 #[doc = "`.ctor()` overload"]
20 fn ctor(self) -> () {
21 unsafe {
22 let __receiver =
23 <DisallowMultipleComponent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
24 ::unity::il2cpp_call!((::unity::module_base()+0x2c4c2a0usize)as*mut u8,();
25(DisallowMultipleComponent)__receiver)
26 }
27 }
28}
29
30#[cfg(feature = "unity_engine-disallowmultiplecomponent")]
31impl<__T: IDisallowMultipleComponent> IDisallowMultipleComponentMethods for __T {}
32
33#[cfg(feature = "unity_engine-disallowmultiplecomponent")]
34impl DisallowMultipleComponent {
35 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
36 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
37 }
38}
39
40#[cfg(feature = "unity_engine-disallowmultiplecomponent")]
41impl DisallowMultipleComponent {
42 #[doc = "`.ctor()` — no args"]
43 pub fn new() -> Self {
44 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
45 panic!(
46 "{}
47::{}
48 failed to instantiate",
49 ::core::stringify!(DisallowMultipleComponent),
50 ::core::stringify!(new),
51 )
52 });
53 <Self as IDisallowMultipleComponentMethods>::ctor(this);
54 this
55 }
56}
57
58#[cfg(feature = "unity_engine-disallowmultiplecomponent")]
59#[doc(hidden)]
60pub mod prelude {
61 pub use super::{DisallowMultipleComponent, IDisallowMultipleComponent, IDisallowMultipleComponentMethods};
62}