1#[cfg(feature = "unity_engine-texture2darray-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::{
9 system::object::{IObject, Object},
10 unity_engine::{
11 object_2::{IObject_2, Object_2},
12 texture::{ITexture, Texture},
13 },
14 };
15
16 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/texture2darray/Texture2DArray.md"))]
17 #[::unity::class(namespace = "UnityEngine", name = "Texture2DArray")]
18 #[parent(crate::unity_engine::texture::Texture)]
19 pub struct Texture2DArray {}
20}
21
22#[cfg(feature = "unity_engine-texture2darray-types")]
23pub use __types::*;
24
25#[cfg(feature = "unity_engine-texture2darray")]
26impl Texture2DArray {
27 #[doc = "`get_allSlices()` overload"]
28 pub fn get_all_slices() -> i32 {
29 unsafe {
30 ::unity::il2cpp_call!((::unity::module_base()+0x378d250usize)as*mut u8,i32;
31 )
32 }
33 }
34
35 #[doc = "`Internal_CreateImpl(crate::unity_engine::texture2darray::Texture2DArray, i32, i32, i32, i32, crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat, crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags)` overload"]
36 pub fn internal_create_impl(
37 mono: impl ::core::convert::Into<crate::unity_engine::texture2darray::Texture2DArray>,
38 w: impl ::core::convert::Into<i32>,
39 h: impl ::core::convert::Into<i32>,
40 d: impl ::core::convert::Into<i32>,
41 mip_count: impl ::core::convert::Into<i32>,
42 format: impl ::core::convert::Into<crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat>,
43 flags: impl ::core::convert::Into<crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags>,
44 ) -> bool {
45 unsafe {
46 ::unity::il2cpp_call!((::unity::module_base()+0x378d2e0usize)as*mut u8,bool;
47(crate::unity_engine::texture2darray::Texture2DArray)::core::convert::Into::into(mono),(i32)::core::convert::Into::into(w),(i32)::core::convert::Into::into(h),(i32)::core::convert::Into::into(d),(i32)::core::convert::Into::into(mip_count),(crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat)::core::convert::Into::into(format),(crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags)::core::convert::Into::into(flags))
48 }
49 }
50
51 #[doc = "`Internal_Create(crate::unity_engine::texture2darray::Texture2DArray, i32, i32, i32, i32, crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat, crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags)` overload"]
52 pub fn internal_create(
53 mono: impl ::core::convert::Into<crate::unity_engine::texture2darray::Texture2DArray>,
54 w: impl ::core::convert::Into<i32>,
55 h: impl ::core::convert::Into<i32>,
56 d: impl ::core::convert::Into<i32>,
57 mip_count: impl ::core::convert::Into<i32>,
58 format: impl ::core::convert::Into<crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat>,
59 flags: impl ::core::convert::Into<crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags>,
60 ) -> () {
61 unsafe {
62 ::unity::il2cpp_call!((::unity::module_base()+0x378d370usize)as*mut u8,();
63(crate::unity_engine::texture2darray::Texture2DArray)::core::convert::Into::into(mono),(i32)::core::convert::Into::into(w),(i32)::core::convert::Into::into(h),(i32)::core::convert::Into::into(d),(i32)::core::convert::Into::into(mip_count),(crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat)::core::convert::Into::into(format),(crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags)::core::convert::Into::into(flags))
64 }
65 }
66
67 #[doc = "`ValidateIsNotCrunched(crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags)` overload"]
68 pub fn validate_is_not_crunched(
69 flags: impl ::core::convert::Into<crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags>,
70 ) -> () {
71 unsafe {
72 ::unity::il2cpp_call!((::unity::module_base()+0x378d760usize)as*mut u8,();
73(crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags)::core::convert::Into::into(flags))
74 }
75 }
76}
77
78#[cfg(feature = "unity_engine-texture2darray")]
79pub trait ITexture2DArrayMethods: ITexture2DArray {
80 #[doc = "`get_isReadable()` overload"]
81 fn get_is_readable(self) -> bool {
82 unsafe {
83 let __receiver = <Texture2DArray as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
84 {
85 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
86 let __vi = *__vt.get(11usize).unwrap_or_else(|| {
87 panic!(
88 "unity: virtual slot {}
89 out of range (vtable len {}
90) on the runtime class behind {}
91 (method `{}
92`)",
93 11usize,
94 __vt.len(),
95 <Texture2DArray as ::unity::ClassIdentity>::NAME,
96 "get_isReadable",
97 )
98 });
99 let __inner: extern "C" fn(Texture2DArray, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
100 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
101 __inner(__receiver, __mi)
102 }
103 }
104 }
105 #[doc = "`.ctor(i32, i32, i32, crate::unity_engine::experimental::rendering::defaultformat::DefaultFormat, crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags)` overload"]
106 fn ctor(
107 self,
108 width: impl ::core::convert::Into<i32>,
109 height: impl ::core::convert::Into<i32>,
110 depth: impl ::core::convert::Into<i32>,
111 format: impl ::core::convert::Into<crate::unity_engine::experimental::rendering::defaultformat::DefaultFormat>,
112 flags: impl ::core::convert::Into<crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags>,
113 ) -> () {
114 unsafe {
115 let __receiver = <Texture2DArray as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
116 ::unity::il2cpp_call!((::unity::module_base()+0x378d450usize)as*mut u8,();
117(Texture2DArray)__receiver,(i32)::core::convert::Into::into(width),(i32)::core::convert::Into::into(height),(i32)::core::convert::Into::into(depth),(crate::unity_engine::experimental::rendering::defaultformat::DefaultFormat)::core::convert::Into::into(format),(crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags)::core::convert::Into::into(flags))
118 }
119 }
120 #[doc = "`.ctor(i32, i32, i32, crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat, crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags)` overload"]
121 fn ctor_2(
122 self,
123 width: impl ::core::convert::Into<i32>,
124 height: impl ::core::convert::Into<i32>,
125 depth: impl ::core::convert::Into<i32>,
126 format: impl ::core::convert::Into<crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat>,
127 flags: impl ::core::convert::Into<crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags>,
128 ) -> () {
129 unsafe {
130 let __receiver = <Texture2DArray as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
131 ::unity::il2cpp_call!((::unity::module_base()+0x378d530usize)as*mut u8,();
132(Texture2DArray)__receiver,(i32)::core::convert::Into::into(width),(i32)::core::convert::Into::into(height),(i32)::core::convert::Into::into(depth),(crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat)::core::convert::Into::into(format),(crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags)::core::convert::Into::into(flags))
133 }
134 }
135 #[doc = "`.ctor(i32, i32, i32, crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat, crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags, i32)` overload"]
136 fn ctor_3(
137 self,
138 width: impl ::core::convert::Into<i32>,
139 height: impl ::core::convert::Into<i32>,
140 depth: impl ::core::convert::Into<i32>,
141 format: impl ::core::convert::Into<crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat>,
142 flags: impl ::core::convert::Into<crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags>,
143 mip_count: impl ::core::convert::Into<i32>,
144 ) -> () {
145 unsafe {
146 let __receiver = <Texture2DArray as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
147 ::unity::il2cpp_call!((::unity::module_base()+0x378d5e0usize)as*mut u8,();
148(Texture2DArray)__receiver,(i32)::core::convert::Into::into(width),(i32)::core::convert::Into::into(height),(i32)::core::convert::Into::into(depth),(crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat)::core::convert::Into::into(format),(crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags)::core::convert::Into::into(flags),(i32)::core::convert::Into::into(mip_count))
149 }
150 }
151 #[doc = "`.ctor(i32, i32, i32, crate::unity_engine::textureformat::TextureFormat, i32, bool)` overload"]
152 fn ctor_4(
153 self,
154 width: impl ::core::convert::Into<i32>,
155 height: impl ::core::convert::Into<i32>,
156 depth: impl ::core::convert::Into<i32>,
157 texture_format: impl ::core::convert::Into<crate::unity_engine::textureformat::TextureFormat>,
158 mip_count: impl ::core::convert::Into<i32>,
159 linear: impl ::core::convert::Into<bool>,
160 ) -> () {
161 unsafe {
162 let __receiver = <Texture2DArray as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
163 ::unity::il2cpp_call!((::unity::module_base()+0x378d7c0usize)as*mut u8,();
164(Texture2DArray)__receiver,(i32)::core::convert::Into::into(width),(i32)::core::convert::Into::into(height),(i32)::core::convert::Into::into(depth),(crate::unity_engine::textureformat::TextureFormat)::core::convert::Into::into(texture_format),(i32)::core::convert::Into::into(mip_count),(bool)::core::convert::Into::into(linear))
165 }
166 }
167 #[doc = "`.ctor(i32, i32, i32, crate::unity_engine::textureformat::TextureFormat, bool, bool)` overload"]
168 fn ctor_5(
169 self,
170 width: impl ::core::convert::Into<i32>,
171 height: impl ::core::convert::Into<i32>,
172 depth: impl ::core::convert::Into<i32>,
173 texture_format: impl ::core::convert::Into<crate::unity_engine::textureformat::TextureFormat>,
174 mip_chain: impl ::core::convert::Into<bool>,
175 linear: impl ::core::convert::Into<bool>,
176 ) -> () {
177 unsafe {
178 let __receiver = <Texture2DArray as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
179 ::unity::il2cpp_call!((::unity::module_base()+0x378d970usize)as*mut u8,();
180(Texture2DArray)__receiver,(i32)::core::convert::Into::into(width),(i32)::core::convert::Into::into(height),(i32)::core::convert::Into::into(depth),(crate::unity_engine::textureformat::TextureFormat)::core::convert::Into::into(texture_format),(bool)::core::convert::Into::into(mip_chain),(bool)::core::convert::Into::into(linear))
181 }
182 }
183 #[doc = "`.ctor(i32, i32, i32, crate::unity_engine::textureformat::TextureFormat, bool)` overload"]
184 fn ctor_6(
185 self,
186 width: impl ::core::convert::Into<i32>,
187 height: impl ::core::convert::Into<i32>,
188 depth: impl ::core::convert::Into<i32>,
189 texture_format: impl ::core::convert::Into<crate::unity_engine::textureformat::TextureFormat>,
190 mip_chain: impl ::core::convert::Into<bool>,
191 ) -> () {
192 unsafe {
193 let __receiver = <Texture2DArray as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
194 ::unity::il2cpp_call!((::unity::module_base()+0x378d990usize)as*mut u8,();
195(Texture2DArray)__receiver,(i32)::core::convert::Into::into(width),(i32)::core::convert::Into::into(height),(i32)::core::convert::Into::into(depth),(crate::unity_engine::textureformat::TextureFormat)::core::convert::Into::into(texture_format),(bool)::core::convert::Into::into(mip_chain))
196 }
197 }
198}
199
200#[cfg(feature = "unity_engine-texture2darray")]
201impl<__T: ITexture2DArray> ITexture2DArrayMethods for __T {}
202
203#[cfg(feature = "unity_engine-texture2darray")]
204impl Texture2DArray {
205 pub fn get_all_slices_method_info() -> &'static ::unity::il2cpp::MethodInfo {
206 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
207 }
208
209 pub fn get_is_readable_method_info() -> &'static ::unity::il2cpp::MethodInfo {
210 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
211 }
212
213 pub fn internal_create_impl_method_info() -> &'static ::unity::il2cpp::MethodInfo {
214 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
215 }
216
217 pub fn internal_create_method_info() -> &'static ::unity::il2cpp::MethodInfo {
218 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
219 }
220
221 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
222 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
223 }
224
225 pub fn ctor_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
226 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
227 }
228
229 pub fn ctor_3_method_info() -> &'static ::unity::il2cpp::MethodInfo {
230 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
231 }
232
233 pub fn ctor_4_method_info() -> &'static ::unity::il2cpp::MethodInfo {
234 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
235 }
236
237 pub fn ctor_5_method_info() -> &'static ::unity::il2cpp::MethodInfo {
238 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
239 }
240
241 pub fn ctor_6_method_info() -> &'static ::unity::il2cpp::MethodInfo {
242 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
243 }
244
245 pub fn validate_is_not_crunched_method_info() -> &'static ::unity::il2cpp::MethodInfo {
246 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
247 }
248}
249
250#[cfg(feature = "unity_engine-texture2darray")]
251impl Texture2DArray {
252 #[doc = "Direct (non-virtual) call to `Texture2DArray`'s own `get_isReadable`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
253 pub unsafe fn get_is_readable(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
254 let __mi = Self::get_is_readable_method_info();
255 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
256 __inner(this.into(), ::core::option::Option::None)
257 }
258}
259
260#[cfg(feature = "unity_engine-texture2darray")]
261impl Texture2DArray {
262 #[doc = "`.ctor(i32, i32, i32, crate::unity_engine::experimental::rendering::defaultformat::DefaultFormat, crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags)` — overload selector"]
263 pub fn new(
264 width: i32,
265 height: i32,
266 depth: i32,
267 format: crate::unity_engine::experimental::rendering::defaultformat::DefaultFormat,
268 flags: crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags,
269 ) -> Self {
270 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
271 panic!(
272 "{}
273::{}
274 failed to instantiate",
275 ::core::stringify!(Texture2DArray),
276 ::core::stringify!(new),
277 )
278 });
279 <Self as ITexture2DArrayMethods>::ctor(this, width, height, depth, format, flags);
280 this
281 }
282
283 #[doc = "`.ctor(i32, i32, i32, crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat, crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags)` — overload selector"]
284 pub fn new_2(
285 width: i32,
286 height: i32,
287 depth: i32,
288 format: crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat,
289 flags: crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags,
290 ) -> Self {
291 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
292 panic!(
293 "{}
294::{}
295 failed to instantiate",
296 ::core::stringify!(Texture2DArray),
297 ::core::stringify!(new_2),
298 )
299 });
300 <Self as ITexture2DArrayMethods>::ctor_2(this, width, height, depth, format, flags);
301 this
302 }
303
304 #[doc = "`.ctor(i32, i32, i32, crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat, crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags, i32)` — overload selector"]
305 pub fn new_3(
306 width: i32,
307 height: i32,
308 depth: i32,
309 format: crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat,
310 flags: crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags,
311 mip_count: i32,
312 ) -> Self {
313 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
314 panic!(
315 "{}
316::{}
317 failed to instantiate",
318 ::core::stringify!(Texture2DArray),
319 ::core::stringify!(new_3),
320 )
321 });
322 <Self as ITexture2DArrayMethods>::ctor_3(this, width, height, depth, format, flags, mip_count);
323 this
324 }
325
326 #[doc = "`.ctor(i32, i32, i32, crate::unity_engine::textureformat::TextureFormat, i32, bool)` — overload selector"]
327 pub fn new_4(
328 width: i32,
329 height: i32,
330 depth: i32,
331 texture_format: crate::unity_engine::textureformat::TextureFormat,
332 mip_count: i32,
333 linear: bool,
334 ) -> Self {
335 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
336 panic!(
337 "{}
338::{}
339 failed to instantiate",
340 ::core::stringify!(Texture2DArray),
341 ::core::stringify!(new_4),
342 )
343 });
344 <Self as ITexture2DArrayMethods>::ctor_4(this, width, height, depth, texture_format, mip_count, linear);
345 this
346 }
347
348 #[doc = "`.ctor(i32, i32, i32, crate::unity_engine::textureformat::TextureFormat, bool, bool)` — overload selector"]
349 pub fn new_5(
350 width: i32,
351 height: i32,
352 depth: i32,
353 texture_format: crate::unity_engine::textureformat::TextureFormat,
354 mip_chain: bool,
355 linear: bool,
356 ) -> Self {
357 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
358 panic!(
359 "{}
360::{}
361 failed to instantiate",
362 ::core::stringify!(Texture2DArray),
363 ::core::stringify!(new_5),
364 )
365 });
366 <Self as ITexture2DArrayMethods>::ctor_5(this, width, height, depth, texture_format, mip_chain, linear);
367 this
368 }
369
370 #[doc = "`.ctor(i32, i32, i32, crate::unity_engine::textureformat::TextureFormat, bool)` — overload selector"]
371 pub fn new_6(width: i32, height: i32, depth: i32, texture_format: crate::unity_engine::textureformat::TextureFormat, mip_chain: bool) -> Self {
372 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
373 panic!(
374 "{}
375::{}
376 failed to instantiate",
377 ::core::stringify!(Texture2DArray),
378 ::core::stringify!(new_6),
379 )
380 });
381 <Self as ITexture2DArrayMethods>::ctor_6(this, width, height, depth, texture_format, mip_chain);
382 this
383 }
384}
385
386#[cfg(feature = "unity_engine-texture2darray")]
387#[doc(hidden)]
388pub mod prelude {
389 pub use super::{ITexture2DArray, ITexture2DArrayMethods, Texture2DArray};
390 #[cfg(feature = "system-object")]
391 pub use crate::system::object::IObjectMethods;
392 #[cfg(feature = "unity_engine-object_2")]
393 pub use crate::unity_engine::object_2::IObject_2Methods;
394 #[cfg(feature = "unity_engine-texture")]
395 pub use crate::unity_engine::texture::ITextureMethods;
396 pub use crate::{
397 system::object::IObject,
398 unity_engine::{object_2::IObject_2, texture::ITexture},
399 };
400}