Skip to main content

engage/generated/unity_engine/
layermask.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-layermask-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::{
9        object::{IObject, Object},
10        valuetype::{IValueType, ValueType},
11    };
12
13    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/layermask/LayerMask.md"))]
14    #[repr(C)]
15    #[derive(::core::clone::Clone, ::core::marker::Copy)]
16    pub struct LayerMask {
17        pub m_mask: i32,
18    }
19    impl ::unity::ClassIdentity for LayerMask {
20        const NAME: &'static str = "LayerMask";
21        const NAMESPACE: &'static str = "UnityEngine";
22
23        fn class() -> ::unity::Class {
24            static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
25            *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
26        }
27    }
28    impl ::unity::IlType for LayerMask {
29        fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
30            &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
31        }
32    }
33}
34
35#[cfg(feature = "unity_engine-layermask-types")]
36pub use __types::*;
37
38#[cfg(feature = "unity_engine-layermask")]
39impl LayerMask {
40    #[doc = "`op_Implicit(crate::unity_engine::layermask::LayerMask)` overload"]
41    pub fn op_implicit(mask: impl ::core::convert::Into<crate::unity_engine::layermask::LayerMask>) -> i32 {
42        unsafe {
43            ::unity::il2cpp_call!((::unity::module_base()+0x2c531c0usize)as*mut u8,i32;
44(crate::unity_engine::layermask::LayerMask)::core::convert::Into::into(mask))
45        }
46    }
47
48    #[doc = "`op_Implicit(i32)` overload"]
49    pub fn op_implicit_2(int_val: impl ::core::convert::Into<i32>) -> crate::unity_engine::layermask::LayerMask {
50        unsafe {
51            ::unity::il2cpp_call!((::unity::module_base()+0x2c531d0usize)as*mut u8,crate::unity_engine::layermask::LayerMask;
52(i32)::core::convert::Into::into(int_val))
53        }
54    }
55
56    #[doc = "`LayerToName(i32)` overload"]
57    pub fn layer_to_name(layer: impl ::core::convert::Into<i32>) -> ::unity::Il2CppString {
58        unsafe {
59            ::unity::il2cpp_call!((::unity::module_base()+0x2c531f0usize)as*mut u8, ::unity::Il2CppString;
60(i32)::core::convert::Into::into(layer))
61        }
62    }
63
64    #[doc = "`NameToLayer(::unity::Il2CppString)` overload"]
65    pub fn name_to_layer(layer_name: impl ::core::convert::Into<::unity::Il2CppString>) -> i32 {
66        unsafe {
67            ::unity::il2cpp_call!((::unity::module_base()+0x2c53240usize)as*mut u8,i32;
68(::unity::Il2CppString)::core::convert::Into::into(layer_name))
69        }
70    }
71
72    #[doc = "`GetMask(::unity::Array<::unity::Il2CppString>)` overload"]
73    pub fn get_mask(layer_names: impl ::core::convert::Into<::unity::Array<::unity::Il2CppString>>) -> i32 {
74        unsafe {
75            ::unity::il2cpp_call!((::unity::module_base()+0x2c53290usize)as*mut u8,i32;
76(::unity::Array< ::unity::Il2CppString>)::core::convert::Into::into(layer_names))
77        }
78    }
79}
80
81#[cfg(feature = "unity_engine-layermask")]
82impl LayerMask {
83    #[doc = "`get_value()` overload"]
84    pub fn get_value(&mut self) -> i32 {
85        unsafe {
86            ::unity::il2cpp_call!((::unity::module_base()+0x2c531e0usize)as*mut u8,i32;
87(*mut LayerMask)self as*mut LayerMask)
88        }
89    }
90}
91
92#[cfg(feature = "unity_engine-layermask")]
93impl LayerMask {
94    pub fn op_implicit_method_info() -> &'static ::unity::il2cpp::MethodInfo {
95        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
96    }
97
98    pub fn op_implicit_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
99        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
100    }
101
102    pub fn get_value_method_info() -> &'static ::unity::il2cpp::MethodInfo {
103        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
104    }
105
106    pub fn layer_to_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
107        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
108    }
109
110    pub fn name_to_layer_method_info() -> &'static ::unity::il2cpp::MethodInfo {
111        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
112    }
113
114    pub fn get_mask_method_info() -> &'static ::unity::il2cpp::MethodInfo {
115        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
116    }
117}
118
119#[cfg(feature = "unity_engine-layermask")]
120#[doc(hidden)]
121pub mod prelude {
122    pub use super::LayerMask;
123    #[cfg(feature = "system-object")]
124    pub use crate::system::object::IObjectMethods;
125    #[cfg(feature = "system-valuetype")]
126    pub use crate::system::valuetype::IValueTypeMethods;
127    pub use crate::system::{object::IObject, valuetype::IValueType};
128}