Skip to main content

engage/generated/unity_engine/
assetreferenceuilabelrestriction.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-assetreferenceuilabelrestriction-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::{
9        system::object::{IObject, Object},
10        unity_engine::assetreferenceuirestriction::{AssetReferenceUIRestriction, IAssetReferenceUIRestriction},
11    };
12
13    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/assetreferenceuilabelrestriction/AssetReferenceUILabelRestriction.md"))]
14    #[::unity::class(namespace = "UnityEngine", name = "AssetReferenceUILabelRestriction")]
15    #[parent(crate::unity_engine::assetreferenceuirestriction::AssetReferenceUIRestriction)]
16    pub struct AssetReferenceUILabelRestriction {
17        #[offset(16)]
18        #[rename(name = "m_AllowedLabels")]
19        pub m_allowed_labels: ::unity::Array<::unity::Il2CppString>,
20        #[offset(24)]
21        #[rename(name = "m_CachedToString")]
22        pub m_cached_to_string: ::unity::Il2CppString,
23    }
24}
25
26#[cfg(feature = "unity_engine-assetreferenceuilabelrestriction-types")]
27pub use __types::*;
28
29#[cfg(feature = "unity_engine-assetreferenceuilabelrestriction")]
30pub trait IAssetReferenceUILabelRestrictionMethods: IAssetReferenceUILabelRestriction {
31    #[doc = "`.ctor(::unity::Array<::unity::Il2CppString>)` overload"]
32    fn ctor(self, allowed_labels: impl ::core::convert::Into<::unity::Array<::unity::Il2CppString>>) -> () {
33        unsafe {
34            let __receiver =
35                <AssetReferenceUILabelRestriction as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
36            ::unity::il2cpp_call!((::unity::module_base()+0x2db3130usize)as*mut u8,();
37(AssetReferenceUILabelRestriction)__receiver,(::unity::Array< ::unity::Il2CppString>)::core::convert::Into::into(allowed_labels))
38        }
39    }
40    #[doc = "`ValidateAsset(crate::unity_engine::object_2::Object_2)` overload"]
41    fn validate_asset(self, obj: impl ::core::convert::Into<crate::unity_engine::object_2::Object_2>) -> bool {
42        unsafe {
43            let __receiver =
44                <AssetReferenceUILabelRestriction as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
45            {
46                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
47                let __vi = *__vt.get(4usize).unwrap_or_else(|| {
48                    panic!(
49                        "unity: virtual slot {}
50 out of range (vtable len {}
51) on the runtime class behind {}
52 (method `{}
53`)",
54                        4usize,
55                        __vt.len(),
56                        <AssetReferenceUILabelRestriction as ::unity::ClassIdentity>::NAME,
57                        "ValidateAsset",
58                    )
59                });
60                let __inner: extern "C" fn(
61                    AssetReferenceUILabelRestriction,
62                    crate::unity_engine::object_2::Object_2,
63                    ::unity::OptionalMethod,
64                ) -> bool = ::core::mem::transmute(__vi.method_ptr);
65                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
66                __inner(__receiver, ::core::convert::Into::into(obj), __mi)
67            }
68        }
69    }
70    #[doc = "`ValidateAsset(::unity::Il2CppString)` overload"]
71    fn validate_asset_2(self, path: impl ::core::convert::Into<::unity::Il2CppString>) -> bool {
72        unsafe {
73            let __receiver =
74                <AssetReferenceUILabelRestriction as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
75            {
76                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
77                let __vi = *__vt.get(5usize).unwrap_or_else(|| {
78                    panic!(
79                        "unity: virtual slot {}
80 out of range (vtable len {}
81) on the runtime class behind {}
82 (method `{}
83`)",
84                        5usize,
85                        __vt.len(),
86                        <AssetReferenceUILabelRestriction as ::unity::ClassIdentity>::NAME,
87                        "ValidateAsset",
88                    )
89                });
90                let __inner: extern "C" fn(AssetReferenceUILabelRestriction, ::unity::Il2CppString, ::unity::OptionalMethod) -> bool =
91                    ::core::mem::transmute(__vi.method_ptr);
92                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
93                __inner(__receiver, ::core::convert::Into::into(path), __mi)
94            }
95        }
96    }
97    #[doc = "`ToString()` overload"]
98    fn to_string(self) -> ::unity::Il2CppString {
99        unsafe {
100            let __receiver =
101                <AssetReferenceUILabelRestriction as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
102            {
103                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
104                let __vi = *__vt.get(3usize).unwrap_or_else(|| {
105                    panic!(
106                        "unity: virtual slot {}
107 out of range (vtable len {}
108) on the runtime class behind {}
109 (method `{}
110`)",
111                        3usize,
112                        __vt.len(),
113                        <AssetReferenceUILabelRestriction as ::unity::ClassIdentity>::NAME,
114                        "ToString",
115                    )
116                });
117                let __inner: extern "C" fn(AssetReferenceUILabelRestriction, ::unity::OptionalMethod) -> ::unity::Il2CppString =
118                    ::core::mem::transmute(__vi.method_ptr);
119                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
120                __inner(__receiver, __mi)
121            }
122        }
123    }
124}
125
126#[cfg(feature = "unity_engine-assetreferenceuilabelrestriction")]
127impl<__T: IAssetReferenceUILabelRestriction> IAssetReferenceUILabelRestrictionMethods for __T {}
128
129#[cfg(feature = "unity_engine-assetreferenceuilabelrestriction")]
130impl AssetReferenceUILabelRestriction {
131    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
132        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
133    }
134
135    pub fn validate_asset_method_info() -> &'static ::unity::il2cpp::MethodInfo {
136        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
137    }
138
139    pub fn validate_asset_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
140        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
141    }
142
143    pub fn to_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
144        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
145    }
146}
147
148#[cfg(feature = "unity_engine-assetreferenceuilabelrestriction")]
149impl AssetReferenceUILabelRestriction {
150    #[doc = "Direct (non-virtual) call to `AssetReferenceUILabelRestriction`'s own `ValidateAsset`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
151    pub unsafe fn validate_asset(this: impl ::core::convert::Into<::unity::IlInstance>, obj: crate::unity_engine::object_2::Object_2) -> bool {
152        let __mi = Self::validate_asset_method_info();
153        let __inner: extern "C" fn(::unity::IlInstance, crate::unity_engine::object_2::Object_2, ::unity::OptionalMethod) -> bool =
154            ::core::mem::transmute(__mi.method_ptr);
155        __inner(this.into(), obj, ::core::option::Option::None)
156    }
157
158    #[doc = "Direct (non-virtual) call to `AssetReferenceUILabelRestriction`'s own `ValidateAsset`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
159    pub unsafe fn validate_asset_2(this: impl ::core::convert::Into<::unity::IlInstance>, path: ::unity::Il2CppString) -> bool {
160        let __mi = Self::validate_asset_2_method_info();
161        let __inner: extern "C" fn(::unity::IlInstance, ::unity::Il2CppString, ::unity::OptionalMethod) -> bool =
162            ::core::mem::transmute(__mi.method_ptr);
163        __inner(this.into(), path, ::core::option::Option::None)
164    }
165
166    #[doc = "Direct (non-virtual) call to `AssetReferenceUILabelRestriction`'s own `ToString`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
167    pub unsafe fn to_string(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
168        let __mi = Self::to_string_method_info();
169        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
170        __inner(this.into(), ::core::option::Option::None)
171    }
172}
173
174#[cfg(feature = "unity_engine-assetreferenceuilabelrestriction")]
175impl AssetReferenceUILabelRestriction {
176    #[doc = "`.ctor(::unity::Array<::unity::Il2CppString>)` — overload selector"]
177    pub fn new(allowed_labels: ::unity::Array<::unity::Il2CppString>) -> Self {
178        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
179            panic!(
180                "{}
181::{}
182 failed to instantiate",
183                ::core::stringify!(AssetReferenceUILabelRestriction),
184                ::core::stringify!(new),
185            )
186        });
187        <Self as IAssetReferenceUILabelRestrictionMethods>::ctor(this, allowed_labels);
188        this
189    }
190}
191
192#[cfg(feature = "unity_engine-assetreferenceuilabelrestriction")]
193#[doc(hidden)]
194pub mod prelude {
195    pub use super::{AssetReferenceUILabelRestriction, IAssetReferenceUILabelRestriction, IAssetReferenceUILabelRestrictionMethods};
196    #[cfg(feature = "system-object")]
197    pub use crate::system::object::IObjectMethods;
198    #[cfg(feature = "unity_engine-assetreferenceuirestriction")]
199    pub use crate::unity_engine::assetreferenceuirestriction::IAssetReferenceUIRestrictionMethods;
200    pub use crate::{system::object::IObject, unity_engine::assetreferenceuirestriction::IAssetReferenceUIRestriction};
201}