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