engage/generated/unity_engine/experimental/rendering/render_graph_module/
rendergraphobjectpool.rs1#[cfg(feature = "unity_engine-experimental-rendering-render_graph_module-rendergraphobjectpool-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::object::{IObject, Object};
9
10 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/experimental/rendering/render_graph_module/rendergraphobjectpool/RenderGraphObjectPool.md"))]
11 #[::unity::class(namespace = "UnityEngine.Experimental.Rendering.RenderGraphModule", name = "RenderGraphObjectPool")]
12 #[parent(crate::system::object::Object)]
13 pub struct RenderGraphObjectPool {
14 #[offset(32)]
15 #[rename(name = "m_AllocatedMaterialPropertyBlocks")]
16 pub m_allocated_material_property_blocks:
17 crate::system::collections::generic::list_1::List_1<crate::unity_engine::materialpropertyblock::MaterialPropertyBlock>,
18 }
19
20 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/experimental/rendering/render_graph_module/rendergraphobjectpool/RenderGraphObjectPool_SharedObjectPool_1.md"))]
21 #[::unity::class(
22 namespace = "UnityEngine.Experimental.Rendering.RenderGraphModule",
23 name = "RenderGraphObjectPool.SharedObjectPool`1"
24 )]
25 #[parent(crate::system::object::Object)]
26 pub struct RenderGraphObjectPool_SharedObjectPool_1<T0: ::unity::ClassIdentity> {
27 #[rename(name = "m_Pool")]
28 pub m_pool: crate::system::collections::generic::stack_1::Stack_1<T0>,
29 #[static_field]
30 #[rename(name = "s_Instance")]
31 pub s_instance: ::unity::IlInstance,
32 }
33}
34
35#[cfg(feature = "unity_engine-experimental-rendering-render_graph_module-rendergraphobjectpool-types")]
36pub use __types::*;
37
38#[cfg(feature = "unity_engine-experimental-rendering-render_graph_module-rendergraphobjectpool")]
39pub trait IRenderGraphObjectPoolMethods: IRenderGraphObjectPool {
40 #[doc = "`.ctor()` overload"]
41 fn ctor(self) -> () {
42 unsafe {
43 let __receiver = <RenderGraphObjectPool as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
44 ::unity::il2cpp_call!((::unity::module_base()+0x30b1630usize)as*mut u8,();
45(RenderGraphObjectPool)__receiver)
46 }
47 }
48 fn get_temp_array<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
49 self,
50 size: impl ::core::convert::Into<i32>,
51 ) -> ::unity::Array<M0> {
52 static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
53 ::unity::lookup::method_info_on_class(<RenderGraphObjectPool as ::unity::ClassIdentity>::class(), "GetTempArray", 1)
54 });
55 #[allow(clippy::type_complexity)]
56 static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
57 ::std::sync::OnceLock::new();
58 let _ = false;
59 let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
60 ::core::result::Result::Ok(mi) => *mi,
61 ::core::result::Result::Err(e) => {
62 panic!(
63 "method lookup failed: {}
64::{}
65: {}
66",
67 <RenderGraphObjectPool as ::unity::ClassIdentity>::NAME,
68 "GetTempArray",
69 e
70 )
71 },
72 };
73 let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
74 let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
75 let __inflated: &'static ::unity::il2cpp::MethodInfo = {
76 let mut __guard = __cache.lock().unwrap();
77 *__guard
78 .entry(__key)
79 .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
80 };
81 unsafe {
82 let __receiver = <RenderGraphObjectPool as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
83 let __f: extern "C" fn(RenderGraphObjectPool, i32, ::unity::OptionalMethod) -> ::unity::Array<M0> =
84 ::core::mem::transmute(__inflated.method_ptr);
85 let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
86 __f(__receiver, ::core::convert::Into::into(size), ::core::option::Option::Some(__mi_opaque))
87 }
88 }
89 #[doc = "`GetTempMaterialPropertyBlock()` overload"]
90 fn get_temp_material_property_block(self) -> crate::unity_engine::materialpropertyblock::MaterialPropertyBlock {
91 unsafe {
92 let __receiver = <RenderGraphObjectPool as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
93 ::unity::il2cpp_call!((::unity::module_base()+0x30ba010usize)as*mut u8,crate::unity_engine::materialpropertyblock::MaterialPropertyBlock;
94(RenderGraphObjectPool)__receiver)
95 }
96 }
97 #[doc = "`ReleaseAllTempAlloc()` overload"]
98 fn release_all_temp_alloc(self) -> () {
99 unsafe {
100 let __receiver = <RenderGraphObjectPool as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
101 ::unity::il2cpp_call!((::unity::module_base()+0x30b9050usize)as*mut u8,();
102(RenderGraphObjectPool)__receiver)
103 }
104 }
105 fn get<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(self) -> M0 {
106 static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
107 ::unity::lookup::method_info_on_class(<RenderGraphObjectPool as ::unity::ClassIdentity>::class(), "Get", 0)
108 });
109 #[allow(clippy::type_complexity)]
110 static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
111 ::std::sync::OnceLock::new();
112 let _ = false;
113 let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
114 ::core::result::Result::Ok(mi) => *mi,
115 ::core::result::Result::Err(e) => {
116 panic!(
117 "method lookup failed: {}
118::{}
119: {}
120",
121 <RenderGraphObjectPool as ::unity::ClassIdentity>::NAME,
122 "Get",
123 e
124 )
125 },
126 };
127 let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
128 let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
129 let __inflated: &'static ::unity::il2cpp::MethodInfo = {
130 let mut __guard = __cache.lock().unwrap();
131 *__guard
132 .entry(__key)
133 .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
134 };
135 unsafe {
136 let __receiver = <RenderGraphObjectPool as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
137 let __f: extern "C" fn(RenderGraphObjectPool, ::unity::OptionalMethod) -> M0 = ::core::mem::transmute(__inflated.method_ptr);
138 let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
139 __f(__receiver, ::core::option::Option::Some(__mi_opaque))
140 }
141 }
142 fn release<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(self, value: impl ::core::convert::Into<M0>) -> () {
143 static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
144 ::unity::lookup::method_info_on_class(<RenderGraphObjectPool as ::unity::ClassIdentity>::class(), "Release", 1)
145 });
146 #[allow(clippy::type_complexity)]
147 static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
148 ::std::sync::OnceLock::new();
149 let _ = false;
150 let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
151 ::core::result::Result::Ok(mi) => *mi,
152 ::core::result::Result::Err(e) => {
153 panic!(
154 "method lookup failed: {}
155::{}
156: {}
157",
158 <RenderGraphObjectPool as ::unity::ClassIdentity>::NAME,
159 "Release",
160 e
161 )
162 },
163 };
164 let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
165 let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
166 let __inflated: &'static ::unity::il2cpp::MethodInfo = {
167 let mut __guard = __cache.lock().unwrap();
168 *__guard
169 .entry(__key)
170 .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
171 };
172 unsafe {
173 let __receiver = <RenderGraphObjectPool as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
174 let __f: extern "C" fn(RenderGraphObjectPool, M0, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__inflated.method_ptr);
175 let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
176 __f(__receiver, ::core::convert::Into::into(value), ::core::option::Option::Some(__mi_opaque))
177 }
178 }
179}
180
181#[cfg(feature = "unity_engine-experimental-rendering-render_graph_module-rendergraphobjectpool")]
182impl<__T: IRenderGraphObjectPool> IRenderGraphObjectPoolMethods for __T {}
183
184#[cfg(feature = "unity_engine-experimental-rendering-render_graph_module-rendergraphobjectpool")]
185impl RenderGraphObjectPool {
186 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
187 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
188 }
189
190 pub fn get_temp_material_property_block_method_info() -> &'static ::unity::il2cpp::MethodInfo {
191 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
192 }
193
194 pub fn release_all_temp_alloc_method_info() -> &'static ::unity::il2cpp::MethodInfo {
195 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
196 }
197}
198
199#[cfg(feature = "unity_engine-experimental-rendering-render_graph_module-rendergraphobjectpool")]
200impl RenderGraphObjectPool {
201 #[doc = "`.ctor()` — no args"]
202 pub fn new() -> Self {
203 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
204 panic!(
205 "{}
206::{}
207 failed to instantiate",
208 ::core::stringify!(RenderGraphObjectPool),
209 ::core::stringify!(new),
210 )
211 });
212 <Self as IRenderGraphObjectPoolMethods>::ctor(this);
213 this
214 }
215}
216
217#[cfg(feature = "unity_engine-experimental-rendering-render_graph_module-rendergraphobjectpool")]
218#[::unity::methods]
219impl<T0: ::unity::ClassIdentity> RenderGraphObjectPool_SharedObjectPool_1<T0> {
220 #[doc = "`Get()` overload"]
221 #[method(name = "Get", args = 0)]
222 pub fn get(self) -> T0;
223
224 #[doc = "`Release(T0)` overload"]
225 #[method(name = "Release", args = 1)]
226 pub fn release(self, value: T0) -> ();
227
228 #[doc = "`get_sharedPool()` overload"]
229 #[method(name = "get_sharedPool", args = 0)]
230 pub fn get_shared_pool(
231 ) -> crate::unity_engine::experimental::rendering::render_graph_module::rendergraphobjectpool::RenderGraphObjectPool_SharedObjectPool_1<T0>;
232
233 #[doc = "`.ctor()` overload"]
234 #[method(name = ".ctor", args = 0)]
235 pub fn ctor(self) -> ();
236
237 #[doc = "`.cctor()` overload"]
238 #[method(name = ".cctor", args = 0)]
239 pub fn cctor() -> ();
240}
241
242#[cfg(feature = "unity_engine-experimental-rendering-render_graph_module-rendergraphobjectpool")]
243impl<T0: ::unity::ClassIdentity> RenderGraphObjectPool_SharedObjectPool_1<T0> {
244 #[doc = "`.ctor()` — no args"]
245 pub fn new() -> Self {
246 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
247 panic!(
248 "{}
249::{}
250 failed to instantiate",
251 ::core::stringify!(RenderGraphObjectPool_SharedObjectPool_1),
252 ::core::stringify!(new),
253 )
254 });
255 <Self as IRenderGraphObjectPool_SharedObjectPool_1Methods<T0>>::ctor(this);
256 this
257 }
258}
259
260#[cfg(feature = "unity_engine-experimental-rendering-render_graph_module-rendergraphobjectpool")]
261#[doc(hidden)]
262pub mod prelude {
263 pub use super::{
264 IRenderGraphObjectPool, IRenderGraphObjectPoolMethods, IRenderGraphObjectPool_SharedObjectPool_1,
265 IRenderGraphObjectPool_SharedObjectPool_1Methods, RenderGraphObjectPool, RenderGraphObjectPool_SharedObjectPool_1,
266 };
267 pub use crate::system::object::IObject;
268 #[cfg(feature = "system-object")]
269 pub use crate::system::object::IObjectMethods;
270}