1#[cfg(feature = "unity_engine-texture-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::object_2::{IObject_2, Object_2},
11 };
12
13 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/texture/Texture.md"))]
14 #[::unity::class(namespace = "UnityEngine", name = "Texture")]
15 #[parent(crate::unity_engine::object_2::Object_2)]
16 pub struct Texture {
17 #[static_field]
18 #[rename(name = "GenerateAllMips")]
19 pub generate_all_mips: i32,
20 }
21}
22
23#[cfg(feature = "unity_engine-texture-types")]
24pub use __types::*;
25
26#[cfg(feature = "unity_engine-texture")]
27impl Texture {
28 #[doc = "`.cctor()` overload"]
29 pub fn cctor() -> () {
30 unsafe {
31 ::unity::il2cpp_call!((::unity::module_base()+0x3789f50usize)as*mut u8,();
32 )
33 }
34 }
35}
36
37#[cfg(feature = "unity_engine-texture")]
38pub trait ITextureMethods: ITexture {
39 #[doc = "`.ctor()` overload"]
40 fn ctor(self) -> () {
41 unsafe {
42 let __receiver = <Texture as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
43 ::unity::il2cpp_call!((::unity::module_base()+0x3789330usize)as*mut u8,();
44(Texture)__receiver)
45 }
46 }
47 #[doc = "`get_mipmapCount()` overload"]
48 fn get_mipmap_count(self) -> i32 {
49 unsafe {
50 let __receiver = <Texture as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
51 ::unity::il2cpp_call!((::unity::module_base()+0x37893a0usize)as*mut u8,i32;
52(Texture)__receiver)
53 }
54 }
55 #[doc = "`get_graphicsFormat()` overload"]
56 fn get_graphics_format(self) -> crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat {
57 unsafe {
58 let __receiver = <Texture as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
59 {
60 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
61 let __vi = *__vt.get(4usize).unwrap_or_else(|| {
62 panic!(
63 "unity: virtual slot {}
64 out of range (vtable len {}
65) on the runtime class behind {}
66 (method `{}
67`)",
68 4usize,
69 __vt.len(),
70 <Texture as ::unity::ClassIdentity>::NAME,
71 "get_graphicsFormat",
72 )
73 });
74 let __inner: extern "C" fn(
75 Texture,
76 ::unity::OptionalMethod,
77 ) -> crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat = ::core::mem::transmute(__vi.method_ptr);
78 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
79 __inner(__receiver, __mi)
80 }
81 }
82 }
83 #[doc = "`GetDataWidth()` overload"]
84 fn get_data_width(self) -> i32 {
85 unsafe {
86 let __receiver = <Texture as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
87 ::unity::il2cpp_call!((::unity::module_base()+0x3789400usize)as*mut u8,i32;
88(Texture)__receiver)
89 }
90 }
91 #[doc = "`GetDataHeight()` overload"]
92 fn get_data_height(self) -> i32 {
93 unsafe {
94 let __receiver = <Texture as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
95 ::unity::il2cpp_call!((::unity::module_base()+0x3789450usize)as*mut u8,i32;
96(Texture)__receiver)
97 }
98 }
99 #[doc = "`GetDimension()` overload"]
100 fn get_dimension(self) -> crate::unity_engine::rendering::texturedimension::TextureDimension {
101 unsafe {
102 let __receiver = <Texture as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
103 ::unity::il2cpp_call!((::unity::module_base()+0x37894a0usize)as*mut u8,crate::unity_engine::rendering::texturedimension::TextureDimension;
104(Texture)__receiver)
105 }
106 }
107 #[doc = "`get_width()` overload"]
108 fn get_width(self) -> i32 {
109 unsafe {
110 let __receiver = <Texture as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
111 {
112 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
113 let __vi = *__vt.get(5usize).unwrap_or_else(|| {
114 panic!(
115 "unity: virtual slot {}
116 out of range (vtable len {}
117) on the runtime class behind {}
118 (method `{}
119`)",
120 5usize,
121 __vt.len(),
122 <Texture as ::unity::ClassIdentity>::NAME,
123 "get_width",
124 )
125 });
126 let __inner: extern "C" fn(Texture, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
127 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
128 __inner(__receiver, __mi)
129 }
130 }
131 }
132 #[doc = "`set_width(i32)` overload"]
133 fn set_width(self, value: impl ::core::convert::Into<i32>) -> () {
134 unsafe {
135 let __receiver = <Texture as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
136 {
137 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
138 let __vi = *__vt.get(6usize).unwrap_or_else(|| {
139 panic!(
140 "unity: virtual slot {}
141 out of range (vtable len {}
142) on the runtime class behind {}
143 (method `{}
144`)",
145 6usize,
146 __vt.len(),
147 <Texture as ::unity::ClassIdentity>::NAME,
148 "set_width",
149 )
150 });
151 let __inner: extern "C" fn(Texture, i32, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
152 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
153 __inner(__receiver, ::core::convert::Into::into(value), __mi)
154 }
155 }
156 }
157 #[doc = "`get_height()` overload"]
158 fn get_height(self) -> i32 {
159 unsafe {
160 let __receiver = <Texture as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
161 {
162 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
163 let __vi = *__vt.get(7usize).unwrap_or_else(|| {
164 panic!(
165 "unity: virtual slot {}
166 out of range (vtable len {}
167) on the runtime class behind {}
168 (method `{}
169`)",
170 7usize,
171 __vt.len(),
172 <Texture as ::unity::ClassIdentity>::NAME,
173 "get_height",
174 )
175 });
176 let __inner: extern "C" fn(Texture, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
177 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
178 __inner(__receiver, __mi)
179 }
180 }
181 }
182 #[doc = "`set_height(i32)` overload"]
183 fn set_height(self, value: impl ::core::convert::Into<i32>) -> () {
184 unsafe {
185 let __receiver = <Texture as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
186 {
187 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
188 let __vi = *__vt.get(8usize).unwrap_or_else(|| {
189 panic!(
190 "unity: virtual slot {}
191 out of range (vtable len {}
192) on the runtime class behind {}
193 (method `{}
194`)",
195 8usize,
196 __vt.len(),
197 <Texture as ::unity::ClassIdentity>::NAME,
198 "set_height",
199 )
200 });
201 let __inner: extern "C" fn(Texture, i32, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
202 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
203 __inner(__receiver, ::core::convert::Into::into(value), __mi)
204 }
205 }
206 }
207 #[doc = "`set_dimension(crate::unity_engine::rendering::texturedimension::TextureDimension)` overload"]
208 fn set_dimension(self, value: impl ::core::convert::Into<crate::unity_engine::rendering::texturedimension::TextureDimension>) -> () {
209 unsafe {
210 let __receiver = <Texture as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
211 {
212 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
213 let __vi = *__vt.get(10usize).unwrap_or_else(|| {
214 panic!(
215 "unity: virtual slot {}
216 out of range (vtable len {}
217) on the runtime class behind {}
218 (method `{}
219`)",
220 10usize,
221 __vt.len(),
222 <Texture as ::unity::ClassIdentity>::NAME,
223 "set_dimension",
224 )
225 });
226 let __inner: extern "C" fn(
227 Texture,
228 crate::unity_engine::rendering::texturedimension::TextureDimension,
229 ::unity::OptionalMethod,
230 ) -> () = ::core::mem::transmute(__vi.method_ptr);
231 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
232 __inner(__receiver, ::core::convert::Into::into(value), __mi)
233 }
234 }
235 }
236 #[doc = "`get_isReadable()` overload"]
237 fn get_is_readable(self) -> bool {
238 unsafe {
239 let __receiver = <Texture as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
240 {
241 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
242 let __vi = *__vt.get(11usize).unwrap_or_else(|| {
243 panic!(
244 "unity: virtual slot {}
245 out of range (vtable len {}
246) on the runtime class behind {}
247 (method `{}
248`)",
249 11usize,
250 __vt.len(),
251 <Texture as ::unity::ClassIdentity>::NAME,
252 "get_isReadable",
253 )
254 });
255 let __inner: extern "C" fn(Texture, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
256 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
257 __inner(__receiver, __mi)
258 }
259 }
260 }
261 #[doc = "`get_wrapMode()` overload"]
262 fn get_wrap_mode(self) -> crate::unity_engine::texturewrapmode::TextureWrapMode {
263 unsafe {
264 let __receiver = <Texture as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
265 ::unity::il2cpp_call!((::unity::module_base()+0x37896f0usize)as*mut u8,crate::unity_engine::texturewrapmode::TextureWrapMode;
266(Texture)__receiver)
267 }
268 }
269 #[doc = "`set_wrapMode(crate::unity_engine::texturewrapmode::TextureWrapMode)` overload"]
270 fn set_wrap_mode(self, value: impl ::core::convert::Into<crate::unity_engine::texturewrapmode::TextureWrapMode>) -> () {
271 unsafe {
272 let __receiver = <Texture as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
273 ::unity::il2cpp_call!((::unity::module_base()+0x3789740usize)as*mut u8,();
274(Texture)__receiver,(crate::unity_engine::texturewrapmode::TextureWrapMode)::core::convert::Into::into(value))
275 }
276 }
277 #[doc = "`set_filterMode(crate::unity_engine::filtermode::FilterMode)` overload"]
278 fn set_filter_mode(self, value: impl ::core::convert::Into<crate::unity_engine::filtermode::FilterMode>) -> () {
279 unsafe {
280 let __receiver = <Texture as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
281 ::unity::il2cpp_call!((::unity::module_base()+0x3789790usize)as*mut u8,();
282(Texture)__receiver,(crate::unity_engine::filtermode::FilterMode)::core::convert::Into::into(value))
283 }
284 }
285 #[doc = "`set_anisoLevel(i32)` overload"]
286 fn set_aniso_level(self, value: impl ::core::convert::Into<i32>) -> () {
287 unsafe {
288 let __receiver = <Texture as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
289 ::unity::il2cpp_call!((::unity::module_base()+0x37897e0usize)as*mut u8,();
290(Texture)__receiver,(i32)::core::convert::Into::into(value))
291 }
292 }
293 #[doc = "`set_mipMapBias(f32)` overload"]
294 fn set_mip_map_bias(self, value: impl ::core::convert::Into<f32>) -> () {
295 unsafe {
296 let __receiver = <Texture as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
297 ::unity::il2cpp_call!((::unity::module_base()+0x3789830usize)as*mut u8,();
298(Texture)__receiver,(f32)::core::convert::Into::into(value))
299 }
300 }
301 #[doc = "`get_texelSize()` overload"]
302 fn get_texel_size(self) -> crate::unity_engine::vector2::Vector2 {
303 unsafe {
304 let __receiver = <Texture as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
305 ::unity::il2cpp_call!((::unity::module_base()+0x3789880usize)as*mut u8,crate::unity_engine::vector2::Vector2;
306(Texture)__receiver)
307 }
308 }
309 #[doc = "`Internal_GetActiveTextureColorSpace()` overload"]
310 fn internal_get_active_texture_color_space(self) -> i32 {
311 unsafe {
312 let __receiver = <Texture as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
313 ::unity::il2cpp_call!((::unity::module_base()+0x3789930usize)as*mut u8,i32;
314(Texture)__receiver)
315 }
316 }
317 #[doc = "`get_activeTextureColorSpace()` overload"]
318 fn get_active_texture_color_space(self) -> crate::unity_engine::colorspace::ColorSpace {
319 unsafe {
320 let __receiver = <Texture as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
321 ::unity::il2cpp_call!((::unity::module_base()+0x3789980usize)as*mut u8,crate::unity_engine::colorspace::ColorSpace;
322(Texture)__receiver)
323 }
324 }
325 #[doc = "`GetPixelDataSize(i32, i32)` overload"]
326 fn get_pixel_data_size(self, mip_level: impl ::core::convert::Into<i32>, element: impl ::core::convert::Into<i32>) -> i32 {
327 unsafe {
328 let __receiver = <Texture as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
329 ::unity::il2cpp_call!((::unity::module_base()+0x37899d0usize)as*mut u8,i32;
330(Texture)__receiver,(i32)::core::convert::Into::into(mip_level),(i32)::core::convert::Into::into(element))
331 }
332 }
333 #[doc = "`GetPixelDataOffset(i32, i32)` overload"]
334 fn get_pixel_data_offset(self, mip_level: impl ::core::convert::Into<i32>, element: impl ::core::convert::Into<i32>) -> i32 {
335 unsafe {
336 let __receiver = <Texture as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
337 ::unity::il2cpp_call!((::unity::module_base()+0x3789a30usize)as*mut u8,i32;
338(Texture)__receiver,(i32)::core::convert::Into::into(mip_level),(i32)::core::convert::Into::into(element))
339 }
340 }
341 #[doc = "`ValidateFormat(crate::unity_engine::textureformat::TextureFormat)` overload"]
342 fn validate_format(self, format: impl ::core::convert::Into<crate::unity_engine::textureformat::TextureFormat>) -> bool {
343 unsafe {
344 let __receiver = <Texture as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
345 ::unity::il2cpp_call!((::unity::module_base()+0x3789a90usize)as*mut u8,bool;
346(Texture)__receiver,(crate::unity_engine::textureformat::TextureFormat)::core::convert::Into::into(format))
347 }
348 }
349 #[doc = "`ValidateFormat(crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat, crate::unity_engine::experimental::rendering::formatusage::FormatUsage)` overload"]
350 fn validate_format_2(
351 self,
352 format: impl ::core::convert::Into<crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat>,
353 usage: impl ::core::convert::Into<crate::unity_engine::experimental::rendering::formatusage::FormatUsage>,
354 ) -> bool {
355 unsafe {
356 let __receiver = <Texture as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
357 ::unity::il2cpp_call!((::unity::module_base()+0x3789c20usize)as*mut u8,bool;
358(Texture)__receiver,(crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat)::core::convert::Into::into(format),(crate::unity_engine::experimental::rendering::formatusage::FormatUsage)::core::convert::Into::into(usage))
359 }
360 }
361 #[doc = "`CreateNonReadableException(crate::unity_engine::texture::Texture)` overload"]
362 fn create_non_readable_exception(
363 self,
364 t: impl ::core::convert::Into<crate::unity_engine::texture::Texture>,
365 ) -> crate::unity_engine::unityexception::UnityException {
366 unsafe {
367 let __receiver = <Texture as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
368 ::unity::il2cpp_call!((::unity::module_base()+0x3789dd0usize)as*mut u8,crate::unity_engine::unityexception::UnityException;
369(Texture)__receiver,(crate::unity_engine::texture::Texture)::core::convert::Into::into(t))
370 }
371 }
372 #[doc = "`get_texelSize_Injected(*mutcrate::unity_engine::vector2::Vector2)` overload"]
373 fn get_texel_size_injected(self) -> crate::unity_engine::vector2::Vector2 {
374 unsafe {
375 let __receiver = <Texture as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
376 let mut __out_0 = ::core::mem::MaybeUninit::<crate::unity_engine::vector2::Vector2>::uninit();
377 ::unity::il2cpp_call!((::unity::module_base()+0x37898e0usize)as*mut u8,();
378(Texture)__receiver,(*mut crate::unity_engine::vector2::Vector2)__out_0.as_mut_ptr());
379 __out_0.assume_init()
380 }
381 }
382}
383
384#[cfg(feature = "unity_engine-texture")]
385impl<__T: ITexture> ITextureMethods for __T {}
386
387#[cfg(feature = "unity_engine-texture")]
388impl Texture {
389 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
390 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
391 }
392
393 pub fn get_mipmap_count_method_info() -> &'static ::unity::il2cpp::MethodInfo {
394 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
395 }
396
397 pub fn get_graphics_format_method_info() -> &'static ::unity::il2cpp::MethodInfo {
398 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
399 }
400
401 pub fn get_data_width_method_info() -> &'static ::unity::il2cpp::MethodInfo {
402 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
403 }
404
405 pub fn get_data_height_method_info() -> &'static ::unity::il2cpp::MethodInfo {
406 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
407 }
408
409 pub fn get_dimension_method_info() -> &'static ::unity::il2cpp::MethodInfo {
410 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
411 }
412
413 pub fn get_width_method_info() -> &'static ::unity::il2cpp::MethodInfo {
414 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
415 }
416
417 pub fn set_width_method_info() -> &'static ::unity::il2cpp::MethodInfo {
418 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
419 }
420
421 pub fn get_height_method_info() -> &'static ::unity::il2cpp::MethodInfo {
422 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
423 }
424
425 pub fn set_height_method_info() -> &'static ::unity::il2cpp::MethodInfo {
426 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
427 }
428
429 pub fn set_dimension_method_info() -> &'static ::unity::il2cpp::MethodInfo {
430 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
431 }
432
433 pub fn get_is_readable_method_info() -> &'static ::unity::il2cpp::MethodInfo {
434 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
435 }
436
437 pub fn get_wrap_mode_method_info() -> &'static ::unity::il2cpp::MethodInfo {
438 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
439 }
440
441 pub fn set_wrap_mode_method_info() -> &'static ::unity::il2cpp::MethodInfo {
442 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
443 }
444
445 pub fn set_filter_mode_method_info() -> &'static ::unity::il2cpp::MethodInfo {
446 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
447 }
448
449 pub fn set_aniso_level_method_info() -> &'static ::unity::il2cpp::MethodInfo {
450 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[16]
451 }
452
453 pub fn set_mip_map_bias_method_info() -> &'static ::unity::il2cpp::MethodInfo {
454 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[17]
455 }
456
457 pub fn get_texel_size_method_info() -> &'static ::unity::il2cpp::MethodInfo {
458 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[18]
459 }
460
461 pub fn internal_get_active_texture_color_space_method_info() -> &'static ::unity::il2cpp::MethodInfo {
462 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[19]
463 }
464
465 pub fn get_active_texture_color_space_method_info() -> &'static ::unity::il2cpp::MethodInfo {
466 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[20]
467 }
468
469 pub fn get_pixel_data_size_method_info() -> &'static ::unity::il2cpp::MethodInfo {
470 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[21]
471 }
472
473 pub fn get_pixel_data_offset_method_info() -> &'static ::unity::il2cpp::MethodInfo {
474 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[22]
475 }
476
477 pub fn validate_format_method_info() -> &'static ::unity::il2cpp::MethodInfo {
478 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[23]
479 }
480
481 pub fn validate_format_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
482 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[24]
483 }
484
485 pub fn create_non_readable_exception_method_info() -> &'static ::unity::il2cpp::MethodInfo {
486 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[25]
487 }
488
489 pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
490 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[26]
491 }
492
493 pub fn get_texel_size_injected_method_info() -> &'static ::unity::il2cpp::MethodInfo {
494 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[27]
495 }
496}
497
498#[cfg(feature = "unity_engine-texture")]
499impl Texture {
500 #[doc = "Direct (non-virtual) call to `Texture`'s own `get_graphicsFormat`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
501 pub unsafe fn get_graphics_format(
502 this: impl ::core::convert::Into<::unity::IlInstance>,
503 ) -> crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat {
504 let __mi = Self::get_graphics_format_method_info();
505 let __inner: extern "C" fn(
506 ::unity::IlInstance,
507 ::unity::OptionalMethod,
508 ) -> crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat = ::core::mem::transmute(__mi.method_ptr);
509 __inner(this.into(), ::core::option::Option::None)
510 }
511
512 #[doc = "Direct (non-virtual) call to `Texture`'s own `get_width`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
513 pub unsafe fn get_width(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
514 let __mi = Self::get_width_method_info();
515 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
516 __inner(this.into(), ::core::option::Option::None)
517 }
518
519 #[doc = "Direct (non-virtual) call to `Texture`'s own `set_width`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
520 pub unsafe fn set_width(this: impl ::core::convert::Into<::unity::IlInstance>, value: i32) -> () {
521 let __mi = Self::set_width_method_info();
522 let __inner: extern "C" fn(::unity::IlInstance, i32, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
523 __inner(this.into(), value, ::core::option::Option::None)
524 }
525
526 #[doc = "Direct (non-virtual) call to `Texture`'s own `get_height`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
527 pub unsafe fn get_height(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
528 let __mi = Self::get_height_method_info();
529 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
530 __inner(this.into(), ::core::option::Option::None)
531 }
532
533 #[doc = "Direct (non-virtual) call to `Texture`'s own `set_height`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
534 pub unsafe fn set_height(this: impl ::core::convert::Into<::unity::IlInstance>, value: i32) -> () {
535 let __mi = Self::set_height_method_info();
536 let __inner: extern "C" fn(::unity::IlInstance, i32, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
537 __inner(this.into(), value, ::core::option::Option::None)
538 }
539
540 #[doc = "Direct (non-virtual) call to `Texture`'s own `set_dimension`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
541 pub unsafe fn set_dimension(
542 this: impl ::core::convert::Into<::unity::IlInstance>,
543 value: crate::unity_engine::rendering::texturedimension::TextureDimension,
544 ) -> () {
545 let __mi = Self::set_dimension_method_info();
546 let __inner: extern "C" fn(
547 ::unity::IlInstance,
548 crate::unity_engine::rendering::texturedimension::TextureDimension,
549 ::unity::OptionalMethod,
550 ) -> () = ::core::mem::transmute(__mi.method_ptr);
551 __inner(this.into(), value, ::core::option::Option::None)
552 }
553
554 #[doc = "Direct (non-virtual) call to `Texture`'s own `get_isReadable`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
555 pub unsafe fn get_is_readable(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
556 let __mi = Self::get_is_readable_method_info();
557 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
558 __inner(this.into(), ::core::option::Option::None)
559 }
560}
561
562#[cfg(feature = "unity_engine-texture")]
563impl Texture {
564 #[doc = "`.ctor()` — no args"]
565 pub fn new() -> Self {
566 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
567 panic!(
568 "{}
569::{}
570 failed to instantiate",
571 ::core::stringify!(Texture),
572 ::core::stringify!(new),
573 )
574 });
575 <Self as ITextureMethods>::ctor(this);
576 this
577 }
578}
579
580#[cfg(feature = "unity_engine-texture")]
581#[doc(hidden)]
582pub mod prelude {
583 pub use super::{ITexture, ITextureMethods, Texture};
584 #[cfg(feature = "system-object")]
585 pub use crate::system::object::IObjectMethods;
586 #[cfg(feature = "unity_engine-object_2")]
587 pub use crate::unity_engine::object_2::IObject_2Methods;
588 pub use crate::{system::object::IObject, unity_engine::object_2::IObject_2};
589}