Skip to main content

engage/generated/unity_engine/bindings/
nativenameattribute.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-bindings-nativenameattribute-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/bindings/nativenameattribute/NativeNameAttribute.md"))]
10    #[::unity::class(namespace = "UnityEngine.Bindings", name = "NativeNameAttribute")]
11    pub struct NativeNameAttribute {}
12}
13
14#[cfg(feature = "unity_engine-bindings-nativenameattribute-types")]
15pub use __types::*;
16
17#[cfg(feature = "unity_engine-bindings-nativenameattribute")]
18pub trait INativeNameAttributeMethods: INativeNameAttribute {
19    #[doc = "`set_Name(::unity::Il2CppString)` overload"]
20    fn set_name(self, value: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
21        unsafe {
22            let __receiver = <NativeNameAttribute as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
23            {
24                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
25                let __vi = *__vt.get(4usize).unwrap_or_else(|| {
26                    panic!(
27                        "unity: virtual slot {}
28 out of range (vtable len {}
29) on the runtime class behind {}
30 (method `{}
31`)",
32                        4usize,
33                        __vt.len(),
34                        <NativeNameAttribute as ::unity::ClassIdentity>::NAME,
35                        "set_Name",
36                    )
37                });
38                let __inner: extern "C" fn(NativeNameAttribute, ::unity::Il2CppString, ::unity::OptionalMethod) -> () =
39                    ::core::mem::transmute(__vi.method_ptr);
40                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
41                __inner(__receiver, ::core::convert::Into::into(value), __mi)
42            }
43        }
44    }
45    #[doc = "`.ctor(::unity::Il2CppString)` overload"]
46    fn ctor(self, name: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
47        unsafe {
48            let __receiver = <NativeNameAttribute as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
49            ::unity::il2cpp_call!((::unity::module_base()+0x3f380b0usize)as*mut u8,();
50(NativeNameAttribute)__receiver,(::unity::Il2CppString)::core::convert::Into::into(name))
51        }
52    }
53}
54
55#[cfg(feature = "unity_engine-bindings-nativenameattribute")]
56impl<__T: INativeNameAttribute> INativeNameAttributeMethods for __T {}
57
58#[cfg(feature = "unity_engine-bindings-nativenameattribute")]
59impl NativeNameAttribute {
60    pub fn set_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
61        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
62    }
63
64    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
65        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
66    }
67}
68
69#[cfg(feature = "unity_engine-bindings-nativenameattribute")]
70impl NativeNameAttribute {
71    #[doc = "Direct (non-virtual) call to `NativeNameAttribute`'s own `set_Name`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
72    pub unsafe fn set_name(this: impl ::core::convert::Into<::unity::IlInstance>, value: ::unity::Il2CppString) -> () {
73        let __mi = Self::set_name_method_info();
74        let __inner: extern "C" fn(::unity::IlInstance, ::unity::Il2CppString, ::unity::OptionalMethod) -> () =
75            ::core::mem::transmute(__mi.method_ptr);
76        __inner(this.into(), value, ::core::option::Option::None)
77    }
78}
79
80#[cfg(feature = "unity_engine-bindings-nativenameattribute")]
81impl NativeNameAttribute {
82    #[doc = "`.ctor(::unity::Il2CppString)` — overload selector"]
83    pub fn new(name: ::unity::Il2CppString) -> Self {
84        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
85            panic!(
86                "{}
87::{}
88 failed to instantiate",
89                ::core::stringify!(NativeNameAttribute),
90                ::core::stringify!(new),
91            )
92        });
93        <Self as INativeNameAttributeMethods>::ctor(this, name);
94        this
95    }
96}
97
98#[cfg(feature = "unity_engine-bindings-nativenameattribute")]
99#[doc(hidden)]
100pub mod prelude {
101    pub use super::{INativeNameAttribute, INativeNameAttributeMethods, NativeNameAttribute};
102}