Skip to main content

engage/generated/unity_engine/
assetreferenceuirestriction.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-assetreferenceuirestriction-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/assetreferenceuirestriction/AssetReferenceUIRestriction.md"))]
10    #[::unity::class(namespace = "UnityEngine", name = "AssetReferenceUIRestriction")]
11    pub struct AssetReferenceUIRestriction {}
12}
13
14#[cfg(feature = "unity_engine-assetreferenceuirestriction-types")]
15pub use __types::*;
16
17#[cfg(feature = "unity_engine-assetreferenceuirestriction")]
18pub trait IAssetReferenceUIRestrictionMethods: IAssetReferenceUIRestriction {
19    #[doc = "`ValidateAsset(crate::unity_engine::object_2::Object_2)` overload"]
20    fn validate_asset(self, obj: impl ::core::convert::Into<crate::unity_engine::object_2::Object_2>) -> bool {
21        unsafe {
22            let __receiver =
23                <AssetReferenceUIRestriction 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                        <AssetReferenceUIRestriction as ::unity::ClassIdentity>::NAME,
36                        "ValidateAsset",
37                    )
38                });
39                let __inner: extern "C" fn(AssetReferenceUIRestriction, crate::unity_engine::object_2::Object_2, ::unity::OptionalMethod) -> bool =
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(obj), __mi)
43            }
44        }
45    }
46    #[doc = "`ValidateAsset(::unity::Il2CppString)` overload"]
47    fn validate_asset_2(self, path: impl ::core::convert::Into<::unity::Il2CppString>) -> bool {
48        unsafe {
49            let __receiver =
50                <AssetReferenceUIRestriction as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
51            {
52                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
53                let __vi = *__vt.get(5usize).unwrap_or_else(|| {
54                    panic!(
55                        "unity: virtual slot {}
56 out of range (vtable len {}
57) on the runtime class behind {}
58 (method `{}
59`)",
60                        5usize,
61                        __vt.len(),
62                        <AssetReferenceUIRestriction as ::unity::ClassIdentity>::NAME,
63                        "ValidateAsset",
64                    )
65                });
66                let __inner: extern "C" fn(AssetReferenceUIRestriction, ::unity::Il2CppString, ::unity::OptionalMethod) -> bool =
67                    ::core::mem::transmute(__vi.method_ptr);
68                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
69                __inner(__receiver, ::core::convert::Into::into(path), __mi)
70            }
71        }
72    }
73    #[doc = "`.ctor()` overload"]
74    fn ctor(self) -> () {
75        unsafe {
76            let __receiver =
77                <AssetReferenceUIRestriction as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
78            ::unity::il2cpp_call!((::unity::module_base()+0x2db3170usize)as*mut u8,();
79(AssetReferenceUIRestriction)__receiver)
80        }
81    }
82}
83
84#[cfg(feature = "unity_engine-assetreferenceuirestriction")]
85impl<__T: IAssetReferenceUIRestriction> IAssetReferenceUIRestrictionMethods for __T {}
86
87#[cfg(feature = "unity_engine-assetreferenceuirestriction")]
88impl AssetReferenceUIRestriction {
89    pub fn validate_asset_method_info() -> &'static ::unity::il2cpp::MethodInfo {
90        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
91    }
92
93    pub fn validate_asset_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
94        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
95    }
96
97    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
98        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
99    }
100}
101
102#[cfg(feature = "unity_engine-assetreferenceuirestriction")]
103impl AssetReferenceUIRestriction {
104    #[doc = "Direct (non-virtual) call to `AssetReferenceUIRestriction`'s own `ValidateAsset`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
105    pub unsafe fn validate_asset(this: impl ::core::convert::Into<::unity::IlInstance>, obj: crate::unity_engine::object_2::Object_2) -> bool {
106        let __mi = Self::validate_asset_method_info();
107        let __inner: extern "C" fn(::unity::IlInstance, crate::unity_engine::object_2::Object_2, ::unity::OptionalMethod) -> bool =
108            ::core::mem::transmute(__mi.method_ptr);
109        __inner(this.into(), obj, ::core::option::Option::None)
110    }
111
112    #[doc = "Direct (non-virtual) call to `AssetReferenceUIRestriction`'s own `ValidateAsset`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
113    pub unsafe fn validate_asset_2(this: impl ::core::convert::Into<::unity::IlInstance>, path: ::unity::Il2CppString) -> bool {
114        let __mi = Self::validate_asset_2_method_info();
115        let __inner: extern "C" fn(::unity::IlInstance, ::unity::Il2CppString, ::unity::OptionalMethod) -> bool =
116            ::core::mem::transmute(__mi.method_ptr);
117        __inner(this.into(), path, ::core::option::Option::None)
118    }
119}
120
121#[cfg(feature = "unity_engine-assetreferenceuirestriction")]
122impl AssetReferenceUIRestriction {
123    #[doc = "`.ctor()` — no args"]
124    pub fn new() -> Self {
125        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
126            panic!(
127                "{}
128::{}
129 failed to instantiate",
130                ::core::stringify!(AssetReferenceUIRestriction),
131                ::core::stringify!(new),
132            )
133        });
134        <Self as IAssetReferenceUIRestrictionMethods>::ctor(this);
135        this
136    }
137}
138
139#[cfg(feature = "unity_engine-assetreferenceuirestriction")]
140#[doc(hidden)]
141pub mod prelude {
142    pub use super::{AssetReferenceUIRestriction, IAssetReferenceUIRestriction, IAssetReferenceUIRestrictionMethods};
143}