Skip to main content

engage/generated/unity_engine/ui/
objectpool_1.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-ui-objectpool_1-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/ui/objectpool_1/ObjectPool_1.md"))]
11    #[::unity::class(namespace = "UnityEngine.UI", name = "ObjectPool`1")]
12    #[parent(crate::system::object::Object)]
13    pub struct ObjectPool_1<T0: ::unity::ClassIdentity> {
14        #[rename(name = "m_Stack")]
15        pub m_stack: crate::system::collections::generic::stack_1::Stack_1<T0>,
16        #[rename(name = "m_ActionOnGet")]
17        pub m_action_on_get: crate::unity_engine::events::unityaction_1::UnityAction_1<T0>,
18        #[rename(name = "m_ActionOnRelease")]
19        pub m_action_on_release: crate::unity_engine::events::unityaction_1::UnityAction_1<T0>,
20    }
21}
22
23#[cfg(feature = "unity_engine-ui-objectpool_1-types")]
24pub use __types::*;
25
26#[cfg(feature = "unity_engine-ui-objectpool_1")]
27#[::unity::methods]
28impl<T0: ::unity::ClassIdentity> ObjectPool_1<T0> {
29    #[doc = "`get_countAll()` overload"]
30    #[method(name = "get_countAll", args = 0)]
31    pub fn get_count_all(self) -> i32;
32
33    #[doc = "`set_countAll(i32)` overload"]
34    #[method(name = "set_countAll", args = 1)]
35    pub fn set_count_all(self, value: i32) -> ();
36
37    #[doc = "`get_countActive()` overload"]
38    #[method(name = "get_countActive", args = 0)]
39    pub fn get_count_active(self) -> i32;
40
41    #[doc = "`get_countInactive()` overload"]
42    #[method(name = "get_countInactive", args = 0)]
43    pub fn get_count_inactive(self) -> i32;
44
45    #[doc = "`.ctor(crate::unity_engine::events::unityaction_1::UnityAction_1<T0>, crate::unity_engine::events::unityaction_1::UnityAction_1<T0>)` overload"]
46    #[method(name = ".ctor", args = 2)]
47    pub fn ctor(
48        self,
49        action_on_get: crate::unity_engine::events::unityaction_1::UnityAction_1<T0>,
50        action_on_release: crate::unity_engine::events::unityaction_1::UnityAction_1<T0>,
51    ) -> ();
52
53    #[doc = "`Get()` overload"]
54    #[method(name = "Get", args = 0)]
55    pub fn get(self) -> T0;
56
57    #[doc = "`Release(T0)` overload"]
58    #[method(name = "Release", args = 1)]
59    pub fn release(self, element: T0) -> ();
60}
61
62#[cfg(feature = "unity_engine-ui-objectpool_1")]
63impl<T0: ::unity::ClassIdentity> ObjectPool_1<T0> {
64    #[doc = "`.ctor(crate::unity_engine::events::unityaction_1::UnityAction_1<T0>, crate::unity_engine::events::unityaction_1::UnityAction_1<T0>)` — overload selector"]
65    pub fn new(
66        action_on_get: crate::unity_engine::events::unityaction_1::UnityAction_1<T0>,
67        action_on_release: crate::unity_engine::events::unityaction_1::UnityAction_1<T0>,
68    ) -> Self {
69        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
70            panic!(
71                "{}
72::{}
73 failed to instantiate",
74                ::core::stringify!(ObjectPool_1),
75                ::core::stringify!(new),
76            )
77        });
78        <Self as IObjectPool_1Methods<T0>>::ctor(this, action_on_get, action_on_release);
79        this
80    }
81}
82
83#[cfg(feature = "unity_engine-ui-objectpool_1")]
84#[doc(hidden)]
85pub mod prelude {
86    pub use super::{IObjectPool_1, IObjectPool_1Methods, ObjectPool_1};
87    pub use crate::system::object::IObject;
88    #[cfg(feature = "system-object")]
89    pub use crate::system::object::IObjectMethods;
90}