Skip to main content

engage/generated/unity_engine/rendering/
hlslarray.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-rendering-hlslarray-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/rendering/hlslarray/HLSLArray.md"))]
10    #[::unity::class(namespace = "UnityEngine.Rendering", name = "HLSLArray")]
11    pub struct HLSLArray {
12        #[offset(16)]
13        #[rename(name = "arraySize")]
14        pub array_size: i32,
15        #[offset(24)]
16        #[rename(name = "elementType")]
17        pub element_type: ::unity::SystemType,
18    }
19}
20
21#[cfg(feature = "unity_engine-rendering-hlslarray-types")]
22pub use __types::*;
23
24#[cfg(feature = "unity_engine-rendering-hlslarray")]
25pub trait IHLSLArrayMethods: IHLSLArray {
26    #[doc = "`.ctor(i32, ::unity::SystemType)` overload"]
27    fn ctor(self, array_size: impl ::core::convert::Into<i32>, element_type: impl ::core::convert::Into<::unity::SystemType>) -> () {
28        unsafe {
29            let __receiver = <HLSLArray as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
30            ::unity::il2cpp_call!((::unity::module_base()+0x30aa610usize)as*mut u8,();
31(HLSLArray)__receiver,(i32)::core::convert::Into::into(array_size),(::unity::SystemType)::core::convert::Into::into(element_type))
32        }
33    }
34}
35
36#[cfg(feature = "unity_engine-rendering-hlslarray")]
37impl<__T: IHLSLArray> IHLSLArrayMethods for __T {}
38
39#[cfg(feature = "unity_engine-rendering-hlslarray")]
40impl HLSLArray {
41    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
42        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
43    }
44}
45
46#[cfg(feature = "unity_engine-rendering-hlslarray")]
47impl HLSLArray {
48    #[doc = "`.ctor(i32, ::unity::SystemType)` — overload selector"]
49    pub fn new(array_size: i32, element_type: ::unity::SystemType) -> Self {
50        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
51            panic!(
52                "{}
53::{}
54 failed to instantiate",
55                ::core::stringify!(HLSLArray),
56                ::core::stringify!(new),
57            )
58        });
59        <Self as IHLSLArrayMethods>::ctor(this, array_size, element_type);
60        this
61    }
62}
63
64#[cfg(feature = "unity_engine-rendering-hlslarray")]
65#[doc(hidden)]
66pub mod prelude {
67    pub use super::{HLSLArray, IHLSLArray, IHLSLArrayMethods};
68}