engage/generated/unity_engine/rendering/
objectpool_1_2.rs1#[cfg(feature = "unity_engine-rendering-objectpool_1_2-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/rendering/objectpool_1_2/ObjectPool_1_2.md"))]
14 #[::unity::class(namespace = "UnityEngine.Rendering", name = "ObjectPool`1")]
15 #[parent(crate::system::object::Object)]
16 pub struct ObjectPool_1_2<T0: ::unity::ClassIdentity> {
17 #[rename(name = "m_Stack")]
18 pub m_stack: crate::system::collections::generic::stack_1::Stack_1<T0>,
19 #[rename(name = "m_ActionOnGet")]
20 pub m_action_on_get: crate::unity_engine::events::unityaction_1::UnityAction_1<T0>,
21 #[rename(name = "m_ActionOnRelease")]
22 pub m_action_on_release: crate::unity_engine::events::unityaction_1::UnityAction_1<T0>,
23 #[rename(name = "m_CollectionCheck")]
24 pub m_collection_check: bool,
25 }
26
27 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/rendering/objectpool_1_2/ObjectPool_1_PooledObject.md"))]
28 #[repr(C)]
29 #[derive(::core::clone::Clone, ::core::marker::Copy)]
30 pub struct ObjectPool_1_PooledObject<T0> {
31 pub _phantom: ::core::marker::PhantomData<(T0,)>,
32 }
33 impl<T0: ::unity::ClassIdentity> ::unity::ClassIdentity for ObjectPool_1_PooledObject<T0> {
34 const NAME: &'static str = "ObjectPool`1.PooledObject";
35 const NAMESPACE: &'static str = "UnityEngine.Rendering";
36
37 fn class() -> ::unity::Class {
38 static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
39 *CACHE.get_or_init(|| {
40 ::unity::Class::lookup(Self::NAMESPACE, Self::NAME)
41 .make_generic(&[<T0 as ::unity::ClassIdentity>::class()])
42 .expect("generic instantiation")
43 })
44 }
45 }
46 impl<T0: ::unity::ClassIdentity> ::unity::IlType for ObjectPool_1_PooledObject<T0> {
47 fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
48 &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
49 }
50 }
51}
52
53#[cfg(feature = "unity_engine-rendering-objectpool_1_2-types")]
54pub use __types::*;
55
56#[cfg(feature = "unity_engine-rendering-objectpool_1_2")]
57#[::unity::methods]
58impl<T0: ::unity::ClassIdentity> ObjectPool_1_2<T0> {
59 #[doc = "`get_countAll()` overload"]
60 #[method(name = "get_countAll", args = 0)]
61 pub fn get_count_all(self) -> i32;
62
63 #[doc = "`set_countAll(i32)` overload"]
64 #[method(name = "set_countAll", args = 1)]
65 pub fn set_count_all(self, value: i32) -> ();
66
67 #[doc = "`get_countActive()` overload"]
68 #[method(name = "get_countActive", args = 0)]
69 pub fn get_count_active(self) -> i32;
70
71 #[doc = "`get_countInactive()` overload"]
72 #[method(name = "get_countInactive", args = 0)]
73 pub fn get_count_inactive(self) -> i32;
74
75 #[doc = "`.ctor(crate::unity_engine::events::unityaction_1::UnityAction_1<T0>, crate::unity_engine::events::unityaction_1::UnityAction_1<T0>, bool)` overload"]
76 #[method(name = ".ctor", args = 3)]
77 pub fn ctor(
78 self,
79 action_on_get: crate::unity_engine::events::unityaction_1::UnityAction_1<T0>,
80 action_on_release: crate::unity_engine::events::unityaction_1::UnityAction_1<T0>,
81 collection_check: bool,
82 ) -> ();
83
84 #[doc = "`Get()` overload"]
85 #[method(name = "Get", args = 0)]
86 pub fn get(self) -> T0;
87
88 #[doc = "`Get(*mutT0)` overload"]
89 #[method(name = "Get", args = 1)]
90 pub fn get_2(self, v: *mut T0) -> crate::unity_engine::rendering::objectpool_1_2::ObjectPool_1_PooledObject<T0>;
91
92 #[doc = "`Release(T0)` overload"]
93 #[method(name = "Release", args = 1)]
94 pub fn release(self, element: T0) -> ();
95}
96
97#[cfg(feature = "unity_engine-rendering-objectpool_1_2")]
98impl<T0: ::unity::ClassIdentity> ObjectPool_1_2<T0> {
99 #[doc = "`.ctor(crate::unity_engine::events::unityaction_1::UnityAction_1<T0>, crate::unity_engine::events::unityaction_1::UnityAction_1<T0>, bool)` — overload selector"]
100 pub fn new(
101 action_on_get: crate::unity_engine::events::unityaction_1::UnityAction_1<T0>,
102 action_on_release: crate::unity_engine::events::unityaction_1::UnityAction_1<T0>,
103 collection_check: bool,
104 ) -> Self {
105 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
106 panic!(
107 "{}
108::{}
109 failed to instantiate",
110 ::core::stringify!(ObjectPool_1_2),
111 ::core::stringify!(new),
112 )
113 });
114 <Self as IObjectPool_1_2Methods<T0>>::ctor(this, action_on_get, action_on_release, collection_check);
115 this
116 }
117}
118
119#[cfg(feature = "unity_engine-rendering-objectpool_1_2")]
120#[::unity::methods(value)]
121impl<T0: ::unity::ClassIdentity> ObjectPool_1_PooledObject<T0> {
122 #[doc = "`.ctor(T0, crate::unity_engine::rendering::objectpool_1_2::ObjectPool_1_2<T0>)` overload"]
123 #[method(name = ".ctor", args = 2)]
124 pub fn ctor(self, value: T0, pool: crate::unity_engine::rendering::objectpool_1_2::ObjectPool_1_2<T0>) -> ();
125
126 #[doc = "`System.IDisposable.Dispose()` overload"]
127 #[method(name = "System.IDisposable.Dispose", args = 0)]
128 pub fn system_i_disposable_dispose(self) -> ();
129}
130
131#[cfg(feature = "unity_engine-rendering-objectpool_1_2")]
132#[doc(hidden)]
133pub mod prelude {
134 pub use super::{IObjectPool_1_2, IObjectPool_1_2Methods, ObjectPool_1_2, ObjectPool_1_PooledObject};
135 #[cfg(feature = "system-object")]
136 pub use crate::system::object::IObjectMethods;
137 #[cfg(feature = "system-valuetype")]
138 pub use crate::system::valuetype::IValueTypeMethods;
139 pub use crate::system::{object::IObject, valuetype::IValueType};
140}