1#[cfg(feature = "unity_engine-texture2d-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/texture2d/Texture2D.md"))]
17 #[::unity::class(namespace = "UnityEngine", name = "Texture2D")]
18 #[parent(crate::unity_engine::texture::Texture)]
19 pub struct Texture2D {}
20}
21
22#[cfg(feature = "unity_engine-texture2d-types")]
23pub use __types::*;
24
25#[cfg(feature = "unity_engine-texture2d")]
26impl Texture2D {
27 #[doc = "`get_whiteTexture()` overload"]
28 pub fn get_white_texture() -> crate::unity_engine::texture2d::Texture2D {
29 unsafe {
30 ::unity::il2cpp_call!((::unity::module_base()+0x3789ff0usize)as*mut u8,crate::unity_engine::texture2d::Texture2D;
31 )
32 }
33 }
34
35 #[doc = "`get_blackTexture()` overload"]
36 pub fn get_black_texture() -> crate::unity_engine::texture2d::Texture2D {
37 unsafe {
38 ::unity::il2cpp_call!((::unity::module_base()+0x378a030usize)as*mut u8,crate::unity_engine::texture2d::Texture2D;
39 )
40 }
41 }
42
43 #[doc = "`get_redTexture()` overload"]
44 pub fn get_red_texture() -> crate::unity_engine::texture2d::Texture2D {
45 unsafe {
46 ::unity::il2cpp_call!((::unity::module_base()+0x378a070usize)as*mut u8,crate::unity_engine::texture2d::Texture2D;
47 )
48 }
49 }
50
51 #[doc = "`get_grayTexture()` overload"]
52 pub fn get_gray_texture() -> crate::unity_engine::texture2d::Texture2D {
53 unsafe {
54 ::unity::il2cpp_call!((::unity::module_base()+0x378a0b0usize)as*mut u8,crate::unity_engine::texture2d::Texture2D;
55 )
56 }
57 }
58
59 #[doc = "`get_linearGrayTexture()` overload"]
60 pub fn get_linear_gray_texture() -> crate::unity_engine::texture2d::Texture2D {
61 unsafe {
62 ::unity::il2cpp_call!((::unity::module_base()+0x378a0f0usize)as*mut u8,crate::unity_engine::texture2d::Texture2D;
63 )
64 }
65 }
66
67 #[doc = "`get_normalTexture()` overload"]
68 pub fn get_normal_texture() -> crate::unity_engine::texture2d::Texture2D {
69 unsafe {
70 ::unity::il2cpp_call!((::unity::module_base()+0x378a130usize)as*mut u8,crate::unity_engine::texture2d::Texture2D;
71 )
72 }
73 }
74
75 #[doc = "`Internal_CreateImpl(crate::unity_engine::texture2d::Texture2D, i32, i32, i32, crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat, crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags, ::unity::IntPtr)` overload"]
76 pub fn internal_create_impl(
77 mono: impl ::core::convert::Into<crate::unity_engine::texture2d::Texture2D>,
78 w: impl ::core::convert::Into<i32>,
79 h: impl ::core::convert::Into<i32>,
80 mip_count: impl ::core::convert::Into<i32>,
81 format: impl ::core::convert::Into<crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat>,
82 flags: impl ::core::convert::Into<crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags>,
83 native_tex: impl ::core::convert::Into<::unity::IntPtr>,
84 ) -> bool {
85 unsafe {
86 ::unity::il2cpp_call!((::unity::module_base()+0x378a1c0usize)as*mut u8,bool;
87(crate::unity_engine::texture2d::Texture2D)::core::convert::Into::into(mono),(i32)::core::convert::Into::into(w),(i32)::core::convert::Into::into(h),(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),(::unity::IntPtr)::core::convert::Into::into(native_tex))
88 }
89 }
90
91 #[doc = "`Internal_Create(crate::unity_engine::texture2d::Texture2D, i32, i32, i32, crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat, crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags, ::unity::IntPtr)` overload"]
92 pub fn internal_create(
93 mono: impl ::core::convert::Into<crate::unity_engine::texture2d::Texture2D>,
94 w: impl ::core::convert::Into<i32>,
95 h: impl ::core::convert::Into<i32>,
96 mip_count: impl ::core::convert::Into<i32>,
97 format: impl ::core::convert::Into<crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat>,
98 flags: impl ::core::convert::Into<crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags>,
99 native_tex: impl ::core::convert::Into<::unity::IntPtr>,
100 ) -> () {
101 unsafe {
102 ::unity::il2cpp_call!((::unity::module_base()+0x378a250usize)as*mut u8,();
103(crate::unity_engine::texture2d::Texture2D)::core::convert::Into::into(mono),(i32)::core::convert::Into::into(w),(i32)::core::convert::Into::into(h),(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),(::unity::IntPtr)::core::convert::Into::into(native_tex))
104 }
105 }
106
107 #[doc = "`GenerateAtlasImpl(::unity::Array<crate::unity_engine::vector2::Vector2>, i32, i32, ::unity::Array<crate::unity_engine::rect::Rect>)` overload"]
108 pub fn generate_atlas_impl(
109 sizes: impl ::core::convert::Into<::unity::Array<crate::unity_engine::vector2::Vector2>>,
110 padding: impl ::core::convert::Into<i32>,
111 atlas_size: impl ::core::convert::Into<i32>,
112 rect: impl ::core::convert::Into<::unity::Array<crate::unity_engine::rect::Rect>>,
113 ) -> () {
114 unsafe {
115 ::unity::il2cpp_call!((::unity::module_base()+0x378abd0usize)as*mut u8,();
116(::unity::Array<crate::unity_engine::vector2::Vector2>)::core::convert::Into::into(sizes),(i32)::core::convert::Into::into(padding),(i32)::core::convert::Into::into(atlas_size),(::unity::Array<crate::unity_engine::rect::Rect>)::core::convert::Into::into(rect))
117 }
118 }
119
120 #[doc = "`CreateExternalTexture(i32, i32, crate::unity_engine::textureformat::TextureFormat, bool, bool, ::unity::IntPtr)` overload"]
121 pub fn create_external_texture(
122 width: impl ::core::convert::Into<i32>,
123 height: impl ::core::convert::Into<i32>,
124 format: impl ::core::convert::Into<crate::unity_engine::textureformat::TextureFormat>,
125 mip_chain: impl ::core::convert::Into<bool>,
126 linear: impl ::core::convert::Into<bool>,
127 native_tex: impl ::core::convert::Into<::unity::IntPtr>,
128 ) -> crate::unity_engine::texture2d::Texture2D {
129 unsafe {
130 ::unity::il2cpp_call!((::unity::module_base()+0x378bcc0usize)as*mut u8,crate::unity_engine::texture2d::Texture2D;
131(i32)::core::convert::Into::into(width),(i32)::core::convert::Into::into(height),(crate::unity_engine::textureformat::TextureFormat)::core::convert::Into::into(format),(bool)::core::convert::Into::into(mip_chain),(bool)::core::convert::Into::into(linear),(::unity::IntPtr)::core::convert::Into::into(native_tex))
132 }
133 }
134
135 #[doc = "`GenerateAtlas(::unity::Array<crate::unity_engine::vector2::Vector2>, i32, i32, crate::system::collections::generic::list_1::List_1<crate::unity_engine::rect::Rect>)` overload"]
136 pub fn generate_atlas(
137 sizes: impl ::core::convert::Into<::unity::Array<crate::unity_engine::vector2::Vector2>>,
138 padding: impl ::core::convert::Into<i32>,
139 atlas_size: impl ::core::convert::Into<i32>,
140 results: impl ::core::convert::Into<crate::system::collections::generic::list_1::List_1<crate::unity_engine::rect::Rect>>,
141 ) -> bool {
142 unsafe {
143 ::unity::il2cpp_call!((::unity::module_base()+0x378cd70usize)as*mut u8,bool;
144(::unity::Array<crate::unity_engine::vector2::Vector2>)::core::convert::Into::into(sizes),(i32)::core::convert::Into::into(padding),(i32)::core::convert::Into::into(atlas_size),(crate::system::collections::generic::list_1::List_1<crate::unity_engine::rect::Rect>)::core::convert::Into::into(results))
145 }
146 }
147}
148
149#[cfg(feature = "unity_engine-texture2d")]
150pub trait ITexture2DMethods: ITexture2D {
151 #[doc = "`get_format()` overload"]
152 fn get_format(self) -> crate::unity_engine::textureformat::TextureFormat {
153 unsafe {
154 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
155 ::unity::il2cpp_call!((::unity::module_base()+0x3789fa0usize)as*mut u8,crate::unity_engine::textureformat::TextureFormat;
156(Texture2D)__receiver)
157 }
158 }
159 #[doc = "`Compress(bool)` overload"]
160 fn compress(self, high_quality: impl ::core::convert::Into<bool>) -> () {
161 unsafe {
162 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
163 ::unity::il2cpp_call!((::unity::module_base()+0x378a170usize)as*mut u8,();
164(Texture2D)__receiver,(bool)::core::convert::Into::into(high_quality))
165 }
166 }
167 #[doc = "`get_isReadable()` overload"]
168 fn get_is_readable(self) -> bool {
169 unsafe {
170 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
171 {
172 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
173 let __vi = *__vt.get(11usize).unwrap_or_else(|| {
174 panic!(
175 "unity: virtual slot {}
176 out of range (vtable len {}
177) on the runtime class behind {}
178 (method `{}
179`)",
180 11usize,
181 __vt.len(),
182 <Texture2D as ::unity::ClassIdentity>::NAME,
183 "get_isReadable",
184 )
185 });
186 let __inner: extern "C" fn(Texture2D, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
187 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
188 __inner(__receiver, __mi)
189 }
190 }
191 }
192 #[doc = "`get_vtOnly()` overload"]
193 fn get_vt_only(self) -> bool {
194 unsafe {
195 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
196 ::unity::il2cpp_call!((::unity::module_base()+0x378a380usize)as*mut u8,bool;
197(Texture2D)__receiver)
198 }
199 }
200 #[doc = "`ApplyImpl(bool, bool)` overload"]
201 fn apply_impl(self, update_mipmaps: impl ::core::convert::Into<bool>, make_no_longer_readable: impl ::core::convert::Into<bool>) -> () {
202 unsafe {
203 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
204 ::unity::il2cpp_call!((::unity::module_base()+0x378a3d0usize)as*mut u8,();
205(Texture2D)__receiver,(bool)::core::convert::Into::into(update_mipmaps),(bool)::core::convert::Into::into(make_no_longer_readable))
206 }
207 }
208 #[doc = "`ResizeImpl(i32, i32)` overload"]
209 fn resize_impl(self, width: impl ::core::convert::Into<i32>, height: impl ::core::convert::Into<i32>) -> bool {
210 unsafe {
211 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
212 ::unity::il2cpp_call!((::unity::module_base()+0x378a430usize)as*mut u8,bool;
213(Texture2D)__receiver,(i32)::core::convert::Into::into(width),(i32)::core::convert::Into::into(height))
214 }
215 }
216 #[doc = "`SetPixelImpl(i32, i32, i32, crate::unity_engine::color::Color)` overload"]
217 fn set_pixel_impl(
218 self,
219 image: impl ::core::convert::Into<i32>,
220 x: impl ::core::convert::Into<i32>,
221 y: impl ::core::convert::Into<i32>,
222 color: impl ::core::convert::Into<crate::unity_engine::color::Color>,
223 ) -> () {
224 unsafe {
225 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
226 ::unity::il2cpp_call!((::unity::module_base()+0x378a490usize)as*mut u8,();
227(Texture2D)__receiver,(i32)::core::convert::Into::into(image),(i32)::core::convert::Into::into(x),(i32)::core::convert::Into::into(y),(crate::unity_engine::color::Color)::core::convert::Into::into(color))
228 }
229 }
230 #[doc = "`GetPixelImpl(i32, i32, i32)` overload"]
231 fn get_pixel_impl(
232 self,
233 image: impl ::core::convert::Into<i32>,
234 x: impl ::core::convert::Into<i32>,
235 y: impl ::core::convert::Into<i32>,
236 ) -> crate::unity_engine::color::Color {
237 unsafe {
238 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
239 ::unity::il2cpp_call!((::unity::module_base()+0x378a580usize)as*mut u8,crate::unity_engine::color::Color;
240(Texture2D)__receiver,(i32)::core::convert::Into::into(image),(i32)::core::convert::Into::into(x),(i32)::core::convert::Into::into(y))
241 }
242 }
243 #[doc = "`GetPixelBilinearImpl(i32, f32, f32)` overload"]
244 fn get_pixel_bilinear_impl(
245 self,
246 image: impl ::core::convert::Into<i32>,
247 u: impl ::core::convert::Into<f32>,
248 v: impl ::core::convert::Into<f32>,
249 ) -> crate::unity_engine::color::Color {
250 unsafe {
251 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
252 ::unity::il2cpp_call!((::unity::module_base()+0x378a680usize)as*mut u8,crate::unity_engine::color::Color;
253(Texture2D)__receiver,(i32)::core::convert::Into::into(image),(f32)::core::convert::Into::into(u),(f32)::core::convert::Into::into(v))
254 }
255 }
256 #[doc = "`ResizeWithFormatImpl(i32, i32, crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat, bool)` overload"]
257 fn resize_with_format_impl(
258 self,
259 width: impl ::core::convert::Into<i32>,
260 height: impl ::core::convert::Into<i32>,
261 format: impl ::core::convert::Into<crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat>,
262 has_mip_map: impl ::core::convert::Into<bool>,
263 ) -> bool {
264 unsafe {
265 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
266 ::unity::il2cpp_call!((::unity::module_base()+0x378a780usize)as*mut u8,bool;
267(Texture2D)__receiver,(i32)::core::convert::Into::into(width),(i32)::core::convert::Into::into(height),(crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat)::core::convert::Into::into(format),(bool)::core::convert::Into::into(has_mip_map))
268 }
269 }
270 #[doc = "`ReadPixelsImpl(crate::unity_engine::rect::Rect, i32, i32, bool)` overload"]
271 fn read_pixels_impl(
272 self,
273 source: impl ::core::convert::Into<crate::unity_engine::rect::Rect>,
274 dest_x: impl ::core::convert::Into<i32>,
275 dest_y: impl ::core::convert::Into<i32>,
276 recalculate_mip_maps: impl ::core::convert::Into<bool>,
277 ) -> () {
278 unsafe {
279 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
280 ::unity::il2cpp_call!((::unity::module_base()+0x378a7f0usize)as*mut u8,();
281(Texture2D)__receiver,(crate::unity_engine::rect::Rect)::core::convert::Into::into(source),(i32)::core::convert::Into::into(dest_x),(i32)::core::convert::Into::into(dest_y),(bool)::core::convert::Into::into(recalculate_mip_maps))
282 }
283 }
284 #[doc = "`SetPixelsImpl(i32, i32, i32, i32, ::unity::Array<crate::unity_engine::color::Color>, i32, i32)` overload"]
285 fn set_pixels_impl(
286 self,
287 x: impl ::core::convert::Into<i32>,
288 y: impl ::core::convert::Into<i32>,
289 w: impl ::core::convert::Into<i32>,
290 h: impl ::core::convert::Into<i32>,
291 pixel: impl ::core::convert::Into<::unity::Array<crate::unity_engine::color::Color>>,
292 miplevel: impl ::core::convert::Into<i32>,
293 frame: impl ::core::convert::Into<i32>,
294 ) -> () {
295 unsafe {
296 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
297 ::unity::il2cpp_call!((::unity::module_base()+0x378a8e0usize)as*mut u8,();
298(Texture2D)__receiver,(i32)::core::convert::Into::into(x),(i32)::core::convert::Into::into(y),(i32)::core::convert::Into::into(w),(i32)::core::convert::Into::into(h),(::unity::Array<crate::unity_engine::color::Color>)::core::convert::Into::into(pixel),(i32)::core::convert::Into::into(miplevel),(i32)::core::convert::Into::into(frame))
299 }
300 }
301 #[doc = "`LoadRawTextureDataImpl(::unity::IntPtr, i32)` overload"]
302 fn load_raw_texture_data_impl(self, data: impl ::core::convert::Into<::unity::IntPtr>, size: impl ::core::convert::Into<i32>) -> bool {
303 unsafe {
304 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
305 ::unity::il2cpp_call!((::unity::module_base()+0x378a980usize)as*mut u8,bool;
306(Texture2D)__receiver,(::unity::IntPtr)::core::convert::Into::into(data),(i32)::core::convert::Into::into(size))
307 }
308 }
309 #[doc = "`LoadRawTextureDataImplArray(::unity::Array<u8>)` overload"]
310 fn load_raw_texture_data_impl_array(self, data: impl ::core::convert::Into<::unity::Array<u8>>) -> bool {
311 unsafe {
312 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
313 ::unity::il2cpp_call!((::unity::module_base()+0x378a9e0usize)as*mut u8,bool;
314(Texture2D)__receiver,(::unity::Array<u8>)::core::convert::Into::into(data))
315 }
316 }
317 #[doc = "`SetPixelDataImplArray(::unity::IlInstance, i32, i32, i32, i32)` overload"]
318 fn set_pixel_data_impl_array(
319 self,
320 data: impl ::core::convert::Into<::unity::IlInstance>,
321 mip_level: impl ::core::convert::Into<i32>,
322 element_size: impl ::core::convert::Into<i32>,
323 data_array_size: impl ::core::convert::Into<i32>,
324 source_data_start_index: impl ::core::convert::Into<i32>,
325 ) -> bool {
326 unsafe {
327 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
328 ::unity::il2cpp_call!((::unity::module_base()+0x378aa30usize)as*mut u8,bool;
329(Texture2D)__receiver,(::unity::IlInstance)::core::convert::Into::into(data),(i32)::core::convert::Into::into(mip_level),(i32)::core::convert::Into::into(element_size),(i32)::core::convert::Into::into(data_array_size),(i32)::core::convert::Into::into(source_data_start_index))
330 }
331 }
332 #[doc = "`SetPixelDataImpl(::unity::IntPtr, i32, i32, i32, i32)` overload"]
333 fn set_pixel_data_impl(
334 self,
335 data: impl ::core::convert::Into<::unity::IntPtr>,
336 mip_level: impl ::core::convert::Into<i32>,
337 element_size: impl ::core::convert::Into<i32>,
338 data_array_size: impl ::core::convert::Into<i32>,
339 source_data_start_index: impl ::core::convert::Into<i32>,
340 ) -> bool {
341 unsafe {
342 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
343 ::unity::il2cpp_call!((::unity::module_base()+0x378aab0usize)as*mut u8,bool;
344(Texture2D)__receiver,(::unity::IntPtr)::core::convert::Into::into(data),(i32)::core::convert::Into::into(mip_level),(i32)::core::convert::Into::into(element_size),(i32)::core::convert::Into::into(data_array_size),(i32)::core::convert::Into::into(source_data_start_index))
345 }
346 }
347 #[doc = "`GetWritableImageData(i32)` overload"]
348 fn get_writable_image_data(self, frame: impl ::core::convert::Into<i32>) -> ::unity::IntPtr {
349 unsafe {
350 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
351 ::unity::il2cpp_call!((::unity::module_base()+0x378ab30usize)as*mut u8, ::unity::IntPtr;
352(Texture2D)__receiver,(i32)::core::convert::Into::into(frame))
353 }
354 }
355 #[doc = "`GetRawImageDataSize()` overload"]
356 fn get_raw_image_data_size(self) -> i64 {
357 unsafe {
358 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
359 ::unity::il2cpp_call!((::unity::module_base()+0x378ab80usize)as*mut u8,i64;
360(Texture2D)__receiver)
361 }
362 }
363 #[doc = "`get_isPreProcessed()` overload"]
364 fn get_is_pre_processed(self) -> bool {
365 unsafe {
366 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
367 ::unity::il2cpp_call!((::unity::module_base()+0x378ac40usize)as*mut u8,bool;
368(Texture2D)__receiver)
369 }
370 }
371 #[doc = "`get_streamingMipmaps()` overload"]
372 fn get_streaming_mipmaps(self) -> bool {
373 unsafe {
374 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
375 ::unity::il2cpp_call!((::unity::module_base()+0x378ac90usize)as*mut u8,bool;
376(Texture2D)__receiver)
377 }
378 }
379 #[doc = "`get_streamingMipmapsPriority()` overload"]
380 fn get_streaming_mipmaps_priority(self) -> i32 {
381 unsafe {
382 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
383 ::unity::il2cpp_call!((::unity::module_base()+0x378ace0usize)as*mut u8,i32;
384(Texture2D)__receiver)
385 }
386 }
387 #[doc = "`get_requestedMipmapLevel()` overload"]
388 fn get_requested_mipmap_level(self) -> i32 {
389 unsafe {
390 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
391 ::unity::il2cpp_call!((::unity::module_base()+0x378ad30usize)as*mut u8,i32;
392(Texture2D)__receiver)
393 }
394 }
395 #[doc = "`set_requestedMipmapLevel(i32)` overload"]
396 fn set_requested_mipmap_level(self, value: impl ::core::convert::Into<i32>) -> () {
397 unsafe {
398 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
399 ::unity::il2cpp_call!((::unity::module_base()+0x378ad80usize)as*mut u8,();
400(Texture2D)__receiver,(i32)::core::convert::Into::into(value))
401 }
402 }
403 #[doc = "`get_minimumMipmapLevel()` overload"]
404 fn get_minimum_mipmap_level(self) -> i32 {
405 unsafe {
406 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
407 ::unity::il2cpp_call!((::unity::module_base()+0x378add0usize)as*mut u8,i32;
408(Texture2D)__receiver)
409 }
410 }
411 #[doc = "`set_minimumMipmapLevel(i32)` overload"]
412 fn set_minimum_mipmap_level(self, value: impl ::core::convert::Into<i32>) -> () {
413 unsafe {
414 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
415 ::unity::il2cpp_call!((::unity::module_base()+0x378ae20usize)as*mut u8,();
416(Texture2D)__receiver,(i32)::core::convert::Into::into(value))
417 }
418 }
419 #[doc = "`get_loadAllMips()` overload"]
420 fn get_load_all_mips(self) -> bool {
421 unsafe {
422 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
423 ::unity::il2cpp_call!((::unity::module_base()+0x378ae70usize)as*mut u8,bool;
424(Texture2D)__receiver)
425 }
426 }
427 #[doc = "`set_loadAllMips(bool)` overload"]
428 fn set_load_all_mips(self, value: impl ::core::convert::Into<bool>) -> () {
429 unsafe {
430 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
431 ::unity::il2cpp_call!((::unity::module_base()+0x378aec0usize)as*mut u8,();
432(Texture2D)__receiver,(bool)::core::convert::Into::into(value))
433 }
434 }
435 #[doc = "`get_calculatedMipmapLevel()` overload"]
436 fn get_calculated_mipmap_level(self) -> i32 {
437 unsafe {
438 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
439 ::unity::il2cpp_call!((::unity::module_base()+0x378af10usize)as*mut u8,i32;
440(Texture2D)__receiver)
441 }
442 }
443 #[doc = "`get_desiredMipmapLevel()` overload"]
444 fn get_desired_mipmap_level(self) -> i32 {
445 unsafe {
446 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
447 ::unity::il2cpp_call!((::unity::module_base()+0x378af60usize)as*mut u8,i32;
448(Texture2D)__receiver)
449 }
450 }
451 #[doc = "`get_loadingMipmapLevel()` overload"]
452 fn get_loading_mipmap_level(self) -> i32 {
453 unsafe {
454 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
455 ::unity::il2cpp_call!((::unity::module_base()+0x378afb0usize)as*mut u8,i32;
456(Texture2D)__receiver)
457 }
458 }
459 #[doc = "`get_loadedMipmapLevel()` overload"]
460 fn get_loaded_mipmap_level(self) -> i32 {
461 unsafe {
462 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
463 ::unity::il2cpp_call!((::unity::module_base()+0x378b000usize)as*mut u8,i32;
464(Texture2D)__receiver)
465 }
466 }
467 #[doc = "`ClearRequestedMipmapLevel()` overload"]
468 fn clear_requested_mipmap_level(self) -> () {
469 unsafe {
470 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
471 ::unity::il2cpp_call!((::unity::module_base()+0x378b050usize)as*mut u8,();
472(Texture2D)__receiver)
473 }
474 }
475 #[doc = "`IsRequestedMipmapLevelLoaded()` overload"]
476 fn is_requested_mipmap_level_loaded(self) -> bool {
477 unsafe {
478 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
479 ::unity::il2cpp_call!((::unity::module_base()+0x378b0a0usize)as*mut u8,bool;
480(Texture2D)__receiver)
481 }
482 }
483 #[doc = "`ClearMinimumMipmapLevel()` overload"]
484 fn clear_minimum_mipmap_level(self) -> () {
485 unsafe {
486 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
487 ::unity::il2cpp_call!((::unity::module_base()+0x378b0f0usize)as*mut u8,();
488(Texture2D)__receiver)
489 }
490 }
491 #[doc = "`UpdateExternalTexture(::unity::IntPtr)` overload"]
492 fn update_external_texture(self, native_tex: impl ::core::convert::Into<::unity::IntPtr>) -> () {
493 unsafe {
494 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
495 ::unity::il2cpp_call!((::unity::module_base()+0x378b140usize)as*mut u8,();
496(Texture2D)__receiver,(::unity::IntPtr)::core::convert::Into::into(native_tex))
497 }
498 }
499 #[doc = "`SetAllPixels32(::unity::Array<crate::unity_engine::color32::Color32>, i32)` overload"]
500 fn set_all_pixels32(
501 self,
502 colors: impl ::core::convert::Into<::unity::Array<crate::unity_engine::color32::Color32>>,
503 miplevel: impl ::core::convert::Into<i32>,
504 ) -> () {
505 unsafe {
506 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
507 ::unity::il2cpp_call!((::unity::module_base()+0x378b190usize)as*mut u8,();
508(Texture2D)__receiver,(::unity::Array<crate::unity_engine::color32::Color32>)::core::convert::Into::into(colors),(i32)::core::convert::Into::into(miplevel))
509 }
510 }
511 #[doc = "`SetBlockOfPixels32(i32, i32, i32, i32, ::unity::Array<crate::unity_engine::color32::Color32>, i32)` overload"]
512 fn set_block_of_pixels32(
513 self,
514 x: impl ::core::convert::Into<i32>,
515 y: impl ::core::convert::Into<i32>,
516 block_width: impl ::core::convert::Into<i32>,
517 block_height: impl ::core::convert::Into<i32>,
518 colors: impl ::core::convert::Into<::unity::Array<crate::unity_engine::color32::Color32>>,
519 miplevel: impl ::core::convert::Into<i32>,
520 ) -> () {
521 unsafe {
522 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
523 ::unity::il2cpp_call!((::unity::module_base()+0x378b1f0usize)as*mut u8,();
524(Texture2D)__receiver,(i32)::core::convert::Into::into(x),(i32)::core::convert::Into::into(y),(i32)::core::convert::Into::into(block_width),(i32)::core::convert::Into::into(block_height),(::unity::Array<crate::unity_engine::color32::Color32>)::core::convert::Into::into(colors),(i32)::core::convert::Into::into(miplevel))
525 }
526 }
527 #[doc = "`GetRawTextureData()` overload"]
528 fn get_raw_texture_data(self) -> ::unity::Array<u8> {
529 unsafe {
530 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
531 ::unity::il2cpp_call!((::unity::module_base()+0x378b280usize)as*mut u8, ::unity::Array<u8> ;
532(Texture2D)__receiver)
533 }
534 }
535 #[doc = "`GetPixels(i32, i32, i32, i32, i32)` overload"]
536 fn get_pixels(
537 self,
538 x: impl ::core::convert::Into<i32>,
539 y: impl ::core::convert::Into<i32>,
540 block_width: impl ::core::convert::Into<i32>,
541 block_height: impl ::core::convert::Into<i32>,
542 miplevel: impl ::core::convert::Into<i32>,
543 ) -> ::unity::Array<crate::unity_engine::color::Color> {
544 unsafe {
545 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
546 ::unity::il2cpp_call!((::unity::module_base()+0x378b2d0usize)as*mut u8, ::unity::Array<crate::unity_engine::color::Color> ;
547(Texture2D)__receiver,(i32)::core::convert::Into::into(x),(i32)::core::convert::Into::into(y),(i32)::core::convert::Into::into(block_width),(i32)::core::convert::Into::into(block_height),(i32)::core::convert::Into::into(miplevel))
548 }
549 }
550 #[doc = "`GetPixels(i32, i32, i32, i32)` overload"]
551 fn get_pixels_2(
552 self,
553 x: impl ::core::convert::Into<i32>,
554 y: impl ::core::convert::Into<i32>,
555 block_width: impl ::core::convert::Into<i32>,
556 block_height: impl ::core::convert::Into<i32>,
557 ) -> ::unity::Array<crate::unity_engine::color::Color> {
558 unsafe {
559 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
560 ::unity::il2cpp_call!((::unity::module_base()+0x378b350usize)as*mut u8, ::unity::Array<crate::unity_engine::color::Color> ;
561(Texture2D)__receiver,(i32)::core::convert::Into::into(x),(i32)::core::convert::Into::into(y),(i32)::core::convert::Into::into(block_width),(i32)::core::convert::Into::into(block_height))
562 }
563 }
564 #[doc = "`GetPixels32(i32)` overload"]
565 fn get_pixels32(self, miplevel: impl ::core::convert::Into<i32>) -> ::unity::Array<crate::unity_engine::color32::Color32> {
566 unsafe {
567 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
568 ::unity::il2cpp_call!((::unity::module_base()+0x378b3d0usize)as*mut u8, ::unity::Array<crate::unity_engine::color32::Color32> ;
569(Texture2D)__receiver,(i32)::core::convert::Into::into(miplevel))
570 }
571 }
572 #[doc = "`GetPixels32()` overload"]
573 fn get_pixels32_2(self) -> ::unity::Array<crate::unity_engine::color32::Color32> {
574 unsafe {
575 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
576 ::unity::il2cpp_call!((::unity::module_base()+0x378b420usize)as*mut u8, ::unity::Array<crate::unity_engine::color32::Color32> ;
577(Texture2D)__receiver)
578 }
579 }
580 #[doc = "`PackTextures(::unity::Array<crate::unity_engine::texture2d::Texture2D>, i32, i32, bool)` overload"]
581 fn pack_textures(
582 self,
583 textures: impl ::core::convert::Into<::unity::Array<crate::unity_engine::texture2d::Texture2D>>,
584 padding: impl ::core::convert::Into<i32>,
585 maximum_atlas_size: impl ::core::convert::Into<i32>,
586 make_no_longer_readable: impl ::core::convert::Into<bool>,
587 ) -> ::unity::Array<crate::unity_engine::rect::Rect> {
588 unsafe {
589 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
590 ::unity::il2cpp_call!((::unity::module_base()+0x378b470usize)as*mut u8, ::unity::Array<crate::unity_engine::rect::Rect> ;
591(Texture2D)__receiver,(::unity::Array<crate::unity_engine::texture2d::Texture2D>)::core::convert::Into::into(textures),(i32)::core::convert::Into::into(padding),(i32)::core::convert::Into::into(maximum_atlas_size),(bool)::core::convert::Into::into(make_no_longer_readable))
592 }
593 }
594 #[doc = "`PackTextures(::unity::Array<crate::unity_engine::texture2d::Texture2D>, i32, i32)` overload"]
595 fn pack_textures_2(
596 self,
597 textures: impl ::core::convert::Into<::unity::Array<crate::unity_engine::texture2d::Texture2D>>,
598 padding: impl ::core::convert::Into<i32>,
599 maximum_atlas_size: impl ::core::convert::Into<i32>,
600 ) -> ::unity::Array<crate::unity_engine::rect::Rect> {
601 unsafe {
602 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
603 ::unity::il2cpp_call!((::unity::module_base()+0x378b4e0usize)as*mut u8, ::unity::Array<crate::unity_engine::rect::Rect> ;
604(Texture2D)__receiver,(::unity::Array<crate::unity_engine::texture2d::Texture2D>)::core::convert::Into::into(textures),(i32)::core::convert::Into::into(padding),(i32)::core::convert::Into::into(maximum_atlas_size))
605 }
606 }
607 #[doc = "`PackTextures(::unity::Array<crate::unity_engine::texture2d::Texture2D>, i32)` overload"]
608 fn pack_textures_3(
609 self,
610 textures: impl ::core::convert::Into<::unity::Array<crate::unity_engine::texture2d::Texture2D>>,
611 padding: impl ::core::convert::Into<i32>,
612 ) -> ::unity::Array<crate::unity_engine::rect::Rect> {
613 unsafe {
614 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
615 ::unity::il2cpp_call!((::unity::module_base()+0x378b550usize)as*mut u8, ::unity::Array<crate::unity_engine::rect::Rect> ;
616(Texture2D)__receiver,(::unity::Array<crate::unity_engine::texture2d::Texture2D>)::core::convert::Into::into(textures),(i32)::core::convert::Into::into(padding))
617 }
618 }
619 #[doc = "`.ctor(i32, i32, crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat, crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags, i32, ::unity::IntPtr)` overload"]
620 fn ctor(
621 self,
622 width: impl ::core::convert::Into<i32>,
623 height: impl ::core::convert::Into<i32>,
624 format: impl ::core::convert::Into<crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat>,
625 flags: impl ::core::convert::Into<crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags>,
626 mip_count: impl ::core::convert::Into<i32>,
627 native_tex: impl ::core::convert::Into<::unity::IntPtr>,
628 ) -> () {
629 unsafe {
630 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
631 ::unity::il2cpp_call!((::unity::module_base()+0x378b5b0usize)as*mut u8,();
632(Texture2D)__receiver,(i32)::core::convert::Into::into(width),(i32)::core::convert::Into::into(height),(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),(::unity::IntPtr)::core::convert::Into::into(native_tex))
633 }
634 }
635 #[doc = "`.ctor(i32, i32, crate::unity_engine::experimental::rendering::defaultformat::DefaultFormat, crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags)` overload"]
636 fn ctor_2(
637 self,
638 width: impl ::core::convert::Into<i32>,
639 height: impl ::core::convert::Into<i32>,
640 format: impl ::core::convert::Into<crate::unity_engine::experimental::rendering::defaultformat::DefaultFormat>,
641 flags: impl ::core::convert::Into<crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags>,
642 ) -> () {
643 unsafe {
644 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
645 ::unity::il2cpp_call!((::unity::module_base()+0x378b6e0usize)as*mut u8,();
646(Texture2D)__receiver,(i32)::core::convert::Into::into(width),(i32)::core::convert::Into::into(height),(crate::unity_engine::experimental::rendering::defaultformat::DefaultFormat)::core::convert::Into::into(format),(crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags)::core::convert::Into::into(flags))
647 }
648 }
649 #[doc = "`.ctor(i32, i32, crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat, crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags)` overload"]
650 fn ctor_3(
651 self,
652 width: impl ::core::convert::Into<i32>,
653 height: impl ::core::convert::Into<i32>,
654 format: impl ::core::convert::Into<crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat>,
655 flags: impl ::core::convert::Into<crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags>,
656 ) -> () {
657 unsafe {
658 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
659 ::unity::il2cpp_call!((::unity::module_base()+0x378b7c0usize)as*mut u8,();
660(Texture2D)__receiver,(i32)::core::convert::Into::into(width),(i32)::core::convert::Into::into(height),(crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat)::core::convert::Into::into(format),(crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags)::core::convert::Into::into(flags))
661 }
662 }
663 #[doc = "`.ctor(i32, i32, crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat, i32, crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags)` overload"]
664 fn ctor_4(
665 self,
666 width: impl ::core::convert::Into<i32>,
667 height: impl ::core::convert::Into<i32>,
668 format: impl ::core::convert::Into<crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat>,
669 mip_count: impl ::core::convert::Into<i32>,
670 flags: impl ::core::convert::Into<crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags>,
671 ) -> () {
672 unsafe {
673 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
674 ::unity::il2cpp_call!((::unity::module_base()+0x378b880usize)as*mut u8,();
675(Texture2D)__receiver,(i32)::core::convert::Into::into(width),(i32)::core::convert::Into::into(height),(crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat)::core::convert::Into::into(format),(i32)::core::convert::Into::into(mip_count),(crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags)::core::convert::Into::into(flags))
676 }
677 }
678 #[doc = "`.ctor(i32, i32, crate::unity_engine::textureformat::TextureFormat, i32, bool, ::unity::IntPtr)` overload"]
679 fn ctor_5(
680 self,
681 width: impl ::core::convert::Into<i32>,
682 height: impl ::core::convert::Into<i32>,
683 texture_format: impl ::core::convert::Into<crate::unity_engine::textureformat::TextureFormat>,
684 mip_count: impl ::core::convert::Into<i32>,
685 linear: impl ::core::convert::Into<bool>,
686 native_tex: impl ::core::convert::Into<::unity::IntPtr>,
687 ) -> () {
688 unsafe {
689 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
690 ::unity::il2cpp_call!((::unity::module_base()+0x378b910usize)as*mut u8,();
691(Texture2D)__receiver,(i32)::core::convert::Into::into(width),(i32)::core::convert::Into::into(height),(crate::unity_engine::textureformat::TextureFormat)::core::convert::Into::into(texture_format),(i32)::core::convert::Into::into(mip_count),(bool)::core::convert::Into::into(linear),(::unity::IntPtr)::core::convert::Into::into(native_tex))
692 }
693 }
694 #[doc = "`.ctor(i32, i32, crate::unity_engine::textureformat::TextureFormat, i32, bool)` overload"]
695 fn ctor_6(
696 self,
697 width: impl ::core::convert::Into<i32>,
698 height: impl ::core::convert::Into<i32>,
699 texture_format: impl ::core::convert::Into<crate::unity_engine::textureformat::TextureFormat>,
700 mip_count: impl ::core::convert::Into<i32>,
701 linear: impl ::core::convert::Into<bool>,
702 ) -> () {
703 unsafe {
704 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
705 ::unity::il2cpp_call!((::unity::module_base()+0x378ba70usize)as*mut u8,();
706(Texture2D)__receiver,(i32)::core::convert::Into::into(width),(i32)::core::convert::Into::into(height),(crate::unity_engine::textureformat::TextureFormat)::core::convert::Into::into(texture_format),(i32)::core::convert::Into::into(mip_count),(bool)::core::convert::Into::into(linear))
707 }
708 }
709 #[doc = "`.ctor(i32, i32, crate::unity_engine::textureformat::TextureFormat, bool, bool)` overload"]
710 fn ctor_7(
711 self,
712 width: impl ::core::convert::Into<i32>,
713 height: impl ::core::convert::Into<i32>,
714 texture_format: impl ::core::convert::Into<crate::unity_engine::textureformat::TextureFormat>,
715 mip_chain: impl ::core::convert::Into<bool>,
716 linear: impl ::core::convert::Into<bool>,
717 ) -> () {
718 unsafe {
719 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
720 ::unity::il2cpp_call!((::unity::module_base()+0x378bb00usize)as*mut u8,();
721(Texture2D)__receiver,(i32)::core::convert::Into::into(width),(i32)::core::convert::Into::into(height),(crate::unity_engine::textureformat::TextureFormat)::core::convert::Into::into(texture_format),(bool)::core::convert::Into::into(mip_chain),(bool)::core::convert::Into::into(linear))
722 }
723 }
724 #[doc = "`.ctor(i32, i32, crate::unity_engine::textureformat::TextureFormat, bool)` overload"]
725 fn ctor_8(
726 self,
727 width: impl ::core::convert::Into<i32>,
728 height: impl ::core::convert::Into<i32>,
729 texture_format: impl ::core::convert::Into<crate::unity_engine::textureformat::TextureFormat>,
730 mip_chain: impl ::core::convert::Into<bool>,
731 ) -> () {
732 unsafe {
733 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
734 ::unity::il2cpp_call!((::unity::module_base()+0x378bb90usize)as*mut u8,();
735(Texture2D)__receiver,(i32)::core::convert::Into::into(width),(i32)::core::convert::Into::into(height),(crate::unity_engine::textureformat::TextureFormat)::core::convert::Into::into(texture_format),(bool)::core::convert::Into::into(mip_chain))
736 }
737 }
738 #[doc = "`.ctor(i32, i32)` overload"]
739 fn ctor_9(self, width: impl ::core::convert::Into<i32>, height: impl ::core::convert::Into<i32>) -> () {
740 unsafe {
741 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
742 ::unity::il2cpp_call!((::unity::module_base()+0x378bc10usize)as*mut u8,();
743(Texture2D)__receiver,(i32)::core::convert::Into::into(width),(i32)::core::convert::Into::into(height))
744 }
745 }
746 #[doc = "`SetPixel(i32, i32, crate::unity_engine::color::Color)` overload"]
747 fn set_pixel(
748 self,
749 x: impl ::core::convert::Into<i32>,
750 y: impl ::core::convert::Into<i32>,
751 color: impl ::core::convert::Into<crate::unity_engine::color::Color>,
752 ) -> () {
753 unsafe {
754 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
755 ::unity::il2cpp_call!((::unity::module_base()+0x378bdd0usize)as*mut u8,();
756(Texture2D)__receiver,(i32)::core::convert::Into::into(x),(i32)::core::convert::Into::into(y),(crate::unity_engine::color::Color)::core::convert::Into::into(color))
757 }
758 }
759 #[doc = "`SetPixel(i32, i32, crate::unity_engine::color::Color, i32)` overload"]
760 fn set_pixel_2(
761 self,
762 x: impl ::core::convert::Into<i32>,
763 y: impl ::core::convert::Into<i32>,
764 color: impl ::core::convert::Into<crate::unity_engine::color::Color>,
765 mip_level: impl ::core::convert::Into<i32>,
766 ) -> () {
767 unsafe {
768 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
769 ::unity::il2cpp_call!((::unity::module_base()+0x378bea0usize)as*mut u8,();
770(Texture2D)__receiver,(i32)::core::convert::Into::into(x),(i32)::core::convert::Into::into(y),(crate::unity_engine::color::Color)::core::convert::Into::into(color),(i32)::core::convert::Into::into(mip_level))
771 }
772 }
773 #[doc = "`SetPixels(i32, i32, i32, i32, ::unity::Array<crate::unity_engine::color::Color>, i32)` overload"]
774 fn set_pixels(
775 self,
776 x: impl ::core::convert::Into<i32>,
777 y: impl ::core::convert::Into<i32>,
778 block_width: impl ::core::convert::Into<i32>,
779 block_height: impl ::core::convert::Into<i32>,
780 colors: impl ::core::convert::Into<::unity::Array<crate::unity_engine::color::Color>>,
781 miplevel: impl ::core::convert::Into<i32>,
782 ) -> () {
783 unsafe {
784 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
785 ::unity::il2cpp_call!((::unity::module_base()+0x378bf80usize)as*mut u8,();
786(Texture2D)__receiver,(i32)::core::convert::Into::into(x),(i32)::core::convert::Into::into(y),(i32)::core::convert::Into::into(block_width),(i32)::core::convert::Into::into(block_height),(::unity::Array<crate::unity_engine::color::Color>)::core::convert::Into::into(colors),(i32)::core::convert::Into::into(miplevel))
787 }
788 }
789 #[doc = "`SetPixels(i32, i32, i32, i32, ::unity::Array<crate::unity_engine::color::Color>)` overload"]
790 fn set_pixels_2(
791 self,
792 x: impl ::core::convert::Into<i32>,
793 y: impl ::core::convert::Into<i32>,
794 block_width: impl ::core::convert::Into<i32>,
795 block_height: impl ::core::convert::Into<i32>,
796 colors: impl ::core::convert::Into<::unity::Array<crate::unity_engine::color::Color>>,
797 ) -> () {
798 unsafe {
799 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
800 ::unity::il2cpp_call!((::unity::module_base()+0x378c040usize)as*mut u8,();
801(Texture2D)__receiver,(i32)::core::convert::Into::into(x),(i32)::core::convert::Into::into(y),(i32)::core::convert::Into::into(block_width),(i32)::core::convert::Into::into(block_height),(::unity::Array<crate::unity_engine::color::Color>)::core::convert::Into::into(colors))
802 }
803 }
804 #[doc = "`SetPixels(::unity::Array<crate::unity_engine::color::Color>, i32)` overload"]
805 fn set_pixels_3(
806 self,
807 colors: impl ::core::convert::Into<::unity::Array<crate::unity_engine::color::Color>>,
808 miplevel: impl ::core::convert::Into<i32>,
809 ) -> () {
810 unsafe {
811 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
812 ::unity::il2cpp_call!((::unity::module_base()+0x378c100usize)as*mut u8,();
813(Texture2D)__receiver,(::unity::Array<crate::unity_engine::color::Color>)::core::convert::Into::into(colors),(i32)::core::convert::Into::into(miplevel))
814 }
815 }
816 #[doc = "`SetPixels(::unity::Array<crate::unity_engine::color::Color>)` overload"]
817 fn set_pixels_4(self, colors: impl ::core::convert::Into<::unity::Array<crate::unity_engine::color::Color>>) -> () {
818 unsafe {
819 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
820 ::unity::il2cpp_call!((::unity::module_base()+0x378c1e0usize)as*mut u8,();
821(Texture2D)__receiver,(::unity::Array<crate::unity_engine::color::Color>)::core::convert::Into::into(colors))
822 }
823 }
824 #[doc = "`GetPixel(i32, i32)` overload"]
825 fn get_pixel(self, x: impl ::core::convert::Into<i32>, y: impl ::core::convert::Into<i32>) -> crate::unity_engine::color::Color {
826 unsafe {
827 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
828 ::unity::il2cpp_call!((::unity::module_base()+0x378c2b0usize)as*mut u8,crate::unity_engine::color::Color;
829(Texture2D)__receiver,(i32)::core::convert::Into::into(x),(i32)::core::convert::Into::into(y))
830 }
831 }
832 #[doc = "`GetPixel(i32, i32, i32)` overload"]
833 fn get_pixel_2(
834 self,
835 x: impl ::core::convert::Into<i32>,
836 y: impl ::core::convert::Into<i32>,
837 mip_level: impl ::core::convert::Into<i32>,
838 ) -> crate::unity_engine::color::Color {
839 unsafe {
840 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
841 ::unity::il2cpp_call!((::unity::module_base()+0x378c360usize)as*mut u8,crate::unity_engine::color::Color;
842(Texture2D)__receiver,(i32)::core::convert::Into::into(x),(i32)::core::convert::Into::into(y),(i32)::core::convert::Into::into(mip_level))
843 }
844 }
845 #[doc = "`GetPixelBilinear(f32, f32)` overload"]
846 fn get_pixel_bilinear(self, u: impl ::core::convert::Into<f32>, v: impl ::core::convert::Into<f32>) -> crate::unity_engine::color::Color {
847 unsafe {
848 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
849 ::unity::il2cpp_call!((::unity::module_base()+0x378c420usize)as*mut u8,crate::unity_engine::color::Color;
850(Texture2D)__receiver,(f32)::core::convert::Into::into(u),(f32)::core::convert::Into::into(v))
851 }
852 }
853 #[doc = "`GetPixelBilinear(f32, f32, i32)` overload"]
854 fn get_pixel_bilinear_2(
855 self,
856 u: impl ::core::convert::Into<f32>,
857 v: impl ::core::convert::Into<f32>,
858 mip_level: impl ::core::convert::Into<i32>,
859 ) -> crate::unity_engine::color::Color {
860 unsafe {
861 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
862 ::unity::il2cpp_call!((::unity::module_base()+0x378c4d0usize)as*mut u8,crate::unity_engine::color::Color;
863(Texture2D)__receiver,(f32)::core::convert::Into::into(u),(f32)::core::convert::Into::into(v),(i32)::core::convert::Into::into(mip_level))
864 }
865 }
866 #[doc = "`LoadRawTextureData(::unity::IntPtr, i32)` overload"]
867 fn load_raw_texture_data(self, data: impl ::core::convert::Into<::unity::IntPtr>, size: impl ::core::convert::Into<i32>) -> () {
868 unsafe {
869 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
870 ::unity::il2cpp_call!((::unity::module_base()+0x378c590usize)as*mut u8,();
871(Texture2D)__receiver,(::unity::IntPtr)::core::convert::Into::into(data),(i32)::core::convert::Into::into(size))
872 }
873 }
874 #[doc = "`LoadRawTextureData(::unity::Array<u8>)` overload"]
875 fn load_raw_texture_data_2(self, data: impl ::core::convert::Into<::unity::Array<u8>>) -> () {
876 unsafe {
877 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
878 ::unity::il2cpp_call!((::unity::module_base()+0x378c6f0usize)as*mut u8,();
879(Texture2D)__receiver,(::unity::Array<u8>)::core::convert::Into::into(data))
880 }
881 }
882 fn set_pixel_data<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
883 self,
884 data: impl ::core::convert::Into<::unity::Array<M0>>,
885 mip_level: impl ::core::convert::Into<i32>,
886 source_data_start_index: impl ::core::convert::Into<i32>,
887 ) -> () {
888 static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> =
889 ::std::sync::LazyLock::new(|| ::unity::lookup::method_info_on_class(<Texture2D as ::unity::ClassIdentity>::class(), "SetPixelData", 3));
890 #[allow(clippy::type_complexity)]
891 static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
892 ::std::sync::OnceLock::new();
893 let _ = false;
894 let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
895 ::core::result::Result::Ok(mi) => *mi,
896 ::core::result::Result::Err(e) => {
897 panic!(
898 "method lookup failed: {}
899::{}
900: {}
901",
902 <Texture2D as ::unity::ClassIdentity>::NAME,
903 "SetPixelData",
904 e
905 )
906 },
907 };
908 let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
909 let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
910 let __inflated: &'static ::unity::il2cpp::MethodInfo = {
911 let mut __guard = __cache.lock().unwrap();
912 *__guard
913 .entry(__key)
914 .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
915 };
916 unsafe {
917 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
918 let __f: extern "C" fn(Texture2D, ::unity::Array<M0>, i32, i32, ::unity::OptionalMethod) -> () =
919 ::core::mem::transmute(__inflated.method_ptr);
920 let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
921 __f(
922 __receiver,
923 ::core::convert::Into::into(data),
924 ::core::convert::Into::into(mip_level),
925 ::core::convert::Into::into(source_data_start_index),
926 ::core::option::Option::Some(__mi_opaque),
927 )
928 }
929 }
930 #[doc = "`Apply(bool, bool)` overload"]
931 fn apply(self, update_mipmaps: impl ::core::convert::Into<bool>, make_no_longer_readable: impl ::core::convert::Into<bool>) -> () {
932 unsafe {
933 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
934 ::unity::il2cpp_call!((::unity::module_base()+0x378c830usize)as*mut u8,();
935(Texture2D)__receiver,(bool)::core::convert::Into::into(update_mipmaps),(bool)::core::convert::Into::into(make_no_longer_readable))
936 }
937 }
938 #[doc = "`Apply(bool)` overload"]
939 fn apply_2(self, update_mipmaps: impl ::core::convert::Into<bool>) -> () {
940 unsafe {
941 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
942 ::unity::il2cpp_call!((::unity::module_base()+0x378c8c0usize)as*mut u8,();
943(Texture2D)__receiver,(bool)::core::convert::Into::into(update_mipmaps))
944 }
945 }
946 #[doc = "`Apply()` overload"]
947 fn apply_3(self) -> () {
948 unsafe {
949 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
950 ::unity::il2cpp_call!((::unity::module_base()+0x378c950usize)as*mut u8,();
951(Texture2D)__receiver)
952 }
953 }
954 #[doc = "`Resize(i32, i32)` overload"]
955 fn resize(self, width: impl ::core::convert::Into<i32>, height: impl ::core::convert::Into<i32>) -> bool {
956 unsafe {
957 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
958 ::unity::il2cpp_call!((::unity::module_base()+0x378c9d0usize)as*mut u8,bool;
959(Texture2D)__receiver,(i32)::core::convert::Into::into(width),(i32)::core::convert::Into::into(height))
960 }
961 }
962 #[doc = "`Resize(i32, i32, crate::unity_engine::textureformat::TextureFormat, bool)` overload"]
963 fn resize_2(
964 self,
965 width: impl ::core::convert::Into<i32>,
966 height: impl ::core::convert::Into<i32>,
967 format: impl ::core::convert::Into<crate::unity_engine::textureformat::TextureFormat>,
968 has_mip_map: impl ::core::convert::Into<bool>,
969 ) -> bool {
970 unsafe {
971 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
972 ::unity::il2cpp_call!((::unity::module_base()+0x378ca60usize)as*mut u8,bool;
973(Texture2D)__receiver,(i32)::core::convert::Into::into(width),(i32)::core::convert::Into::into(height),(crate::unity_engine::textureformat::TextureFormat)::core::convert::Into::into(format),(bool)::core::convert::Into::into(has_mip_map))
974 }
975 }
976 #[doc = "`Resize(i32, i32, crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat, bool)` overload"]
977 fn resize_3(
978 self,
979 width: impl ::core::convert::Into<i32>,
980 height: impl ::core::convert::Into<i32>,
981 format: impl ::core::convert::Into<crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat>,
982 has_mip_map: impl ::core::convert::Into<bool>,
983 ) -> bool {
984 unsafe {
985 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
986 ::unity::il2cpp_call!((::unity::module_base()+0x378cb10usize)as*mut u8,bool;
987(Texture2D)__receiver,(i32)::core::convert::Into::into(width),(i32)::core::convert::Into::into(height),(crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat)::core::convert::Into::into(format),(bool)::core::convert::Into::into(has_mip_map))
988 }
989 }
990 #[doc = "`ReadPixels(crate::unity_engine::rect::Rect, i32, i32, bool)` overload"]
991 fn read_pixels(
992 self,
993 source: impl ::core::convert::Into<crate::unity_engine::rect::Rect>,
994 dest_x: impl ::core::convert::Into<i32>,
995 dest_y: impl ::core::convert::Into<i32>,
996 recalculate_mip_maps: impl ::core::convert::Into<bool>,
997 ) -> () {
998 unsafe {
999 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
1000 ::unity::il2cpp_call!((::unity::module_base()+0x378cbc0usize)as*mut u8,();
1001(Texture2D)__receiver,(crate::unity_engine::rect::Rect)::core::convert::Into::into(source),(i32)::core::convert::Into::into(dest_x),(i32)::core::convert::Into::into(dest_y),(bool)::core::convert::Into::into(recalculate_mip_maps))
1002 }
1003 }
1004 #[doc = "`ReadPixels(crate::unity_engine::rect::Rect, i32, i32)` overload"]
1005 fn read_pixels_2(
1006 self,
1007 source: impl ::core::convert::Into<crate::unity_engine::rect::Rect>,
1008 dest_x: impl ::core::convert::Into<i32>,
1009 dest_y: impl ::core::convert::Into<i32>,
1010 ) -> () {
1011 unsafe {
1012 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
1013 ::unity::il2cpp_call!((::unity::module_base()+0x378cca0usize)as*mut u8,();
1014(Texture2D)__receiver,(crate::unity_engine::rect::Rect)::core::convert::Into::into(source),(i32)::core::convert::Into::into(dest_x),(i32)::core::convert::Into::into(dest_y))
1015 }
1016 }
1017 #[doc = "`SetPixels32(::unity::Array<crate::unity_engine::color32::Color32>, i32)` overload"]
1018 fn set_pixels32(
1019 self,
1020 colors: impl ::core::convert::Into<::unity::Array<crate::unity_engine::color32::Color32>>,
1021 miplevel: impl ::core::convert::Into<i32>,
1022 ) -> () {
1023 unsafe {
1024 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
1025 ::unity::il2cpp_call!((::unity::module_base()+0x378cf40usize)as*mut u8,();
1026(Texture2D)__receiver,(::unity::Array<crate::unity_engine::color32::Color32>)::core::convert::Into::into(colors),(i32)::core::convert::Into::into(miplevel))
1027 }
1028 }
1029 #[doc = "`SetPixels32(::unity::Array<crate::unity_engine::color32::Color32>)` overload"]
1030 fn set_pixels32_2(self, colors: impl ::core::convert::Into<::unity::Array<crate::unity_engine::color32::Color32>>) -> () {
1031 unsafe {
1032 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
1033 ::unity::il2cpp_call!((::unity::module_base()+0x378cfa0usize)as*mut u8,();
1034(Texture2D)__receiver,(::unity::Array<crate::unity_engine::color32::Color32>)::core::convert::Into::into(colors))
1035 }
1036 }
1037 #[doc = "`SetPixels32(i32, i32, i32, i32, ::unity::Array<crate::unity_engine::color32::Color32>, i32)` overload"]
1038 fn set_pixels32_3(
1039 self,
1040 x: impl ::core::convert::Into<i32>,
1041 y: impl ::core::convert::Into<i32>,
1042 block_width: impl ::core::convert::Into<i32>,
1043 block_height: impl ::core::convert::Into<i32>,
1044 colors: impl ::core::convert::Into<::unity::Array<crate::unity_engine::color32::Color32>>,
1045 miplevel: impl ::core::convert::Into<i32>,
1046 ) -> () {
1047 unsafe {
1048 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
1049 ::unity::il2cpp_call!((::unity::module_base()+0x378d000usize)as*mut u8,();
1050(Texture2D)__receiver,(i32)::core::convert::Into::into(x),(i32)::core::convert::Into::into(y),(i32)::core::convert::Into::into(block_width),(i32)::core::convert::Into::into(block_height),(::unity::Array<crate::unity_engine::color32::Color32>)::core::convert::Into::into(colors),(i32)::core::convert::Into::into(miplevel))
1051 }
1052 }
1053 #[doc = "`SetPixels32(i32, i32, i32, i32, ::unity::Array<crate::unity_engine::color32::Color32>)` overload"]
1054 fn set_pixels32_4(
1055 self,
1056 x: impl ::core::convert::Into<i32>,
1057 y: impl ::core::convert::Into<i32>,
1058 block_width: impl ::core::convert::Into<i32>,
1059 block_height: impl ::core::convert::Into<i32>,
1060 colors: impl ::core::convert::Into<::unity::Array<crate::unity_engine::color32::Color32>>,
1061 ) -> () {
1062 unsafe {
1063 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
1064 ::unity::il2cpp_call!((::unity::module_base()+0x378d090usize)as*mut u8,();
1065(Texture2D)__receiver,(i32)::core::convert::Into::into(x),(i32)::core::convert::Into::into(y),(i32)::core::convert::Into::into(block_width),(i32)::core::convert::Into::into(block_height),(::unity::Array<crate::unity_engine::color32::Color32>)::core::convert::Into::into(colors))
1066 }
1067 }
1068 #[doc = "`GetPixels(i32)` overload"]
1069 fn get_pixels_3(self, miplevel: impl ::core::convert::Into<i32>) -> ::unity::Array<crate::unity_engine::color::Color> {
1070 unsafe {
1071 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
1072 ::unity::il2cpp_call!((::unity::module_base()+0x378d120usize)as*mut u8, ::unity::Array<crate::unity_engine::color::Color> ;
1073(Texture2D)__receiver,(i32)::core::convert::Into::into(miplevel))
1074 }
1075 }
1076 #[doc = "`GetPixels()` overload"]
1077 fn get_pixels_4(self) -> ::unity::Array<crate::unity_engine::color::Color> {
1078 unsafe {
1079 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
1080 ::unity::il2cpp_call!((::unity::module_base()+0x378d1c0usize)as*mut u8, ::unity::Array<crate::unity_engine::color::Color> ;
1081(Texture2D)__receiver)
1082 }
1083 }
1084 #[doc = "`SetPixelImpl_Injected(i32, i32, i32, *mutcrate::unity_engine::color::Color)` overload"]
1085 fn set_pixel_impl_injected(
1086 self,
1087 image: impl ::core::convert::Into<i32>,
1088 x: impl ::core::convert::Into<i32>,
1089 y: impl ::core::convert::Into<i32>,
1090 ) -> crate::unity_engine::color::Color {
1091 unsafe {
1092 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
1093 let mut __out_0 = ::core::mem::MaybeUninit::<crate::unity_engine::color::Color>::uninit();
1094 ::unity::il2cpp_call!((::unity::module_base()+0x378a510usize)as*mut u8,();
1095(Texture2D)__receiver,(i32)::core::convert::Into::into(image),(i32)::core::convert::Into::into(x),(i32)::core::convert::Into::into(y),(*mut crate::unity_engine::color::Color)__out_0.as_mut_ptr());
1096 __out_0.assume_init()
1097 }
1098 }
1099 #[doc = "`GetPixelImpl_Injected(i32, i32, i32, *mutcrate::unity_engine::color::Color)` overload"]
1100 fn get_pixel_impl_injected(
1101 self,
1102 image: impl ::core::convert::Into<i32>,
1103 x: impl ::core::convert::Into<i32>,
1104 y: impl ::core::convert::Into<i32>,
1105 ) -> crate::unity_engine::color::Color {
1106 unsafe {
1107 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
1108 let mut __out_0 = ::core::mem::MaybeUninit::<crate::unity_engine::color::Color>::uninit();
1109 ::unity::il2cpp_call!((::unity::module_base()+0x378a610usize)as*mut u8,();
1110(Texture2D)__receiver,(i32)::core::convert::Into::into(image),(i32)::core::convert::Into::into(x),(i32)::core::convert::Into::into(y),(*mut crate::unity_engine::color::Color)__out_0.as_mut_ptr());
1111 __out_0.assume_init()
1112 }
1113 }
1114 #[doc = "`GetPixelBilinearImpl_Injected(i32, f32, f32, *mutcrate::unity_engine::color::Color)` overload"]
1115 fn get_pixel_bilinear_impl_injected(
1116 self,
1117 image: impl ::core::convert::Into<i32>,
1118 u: impl ::core::convert::Into<f32>,
1119 v: impl ::core::convert::Into<f32>,
1120 ) -> crate::unity_engine::color::Color {
1121 unsafe {
1122 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
1123 let mut __out_0 = ::core::mem::MaybeUninit::<crate::unity_engine::color::Color>::uninit();
1124 ::unity::il2cpp_call!((::unity::module_base()+0x378a710usize)as*mut u8,();
1125(Texture2D)__receiver,(i32)::core::convert::Into::into(image),(f32)::core::convert::Into::into(u),(f32)::core::convert::Into::into(v),(*mut crate::unity_engine::color::Color)__out_0.as_mut_ptr());
1126 __out_0.assume_init()
1127 }
1128 }
1129 #[doc = "`ReadPixelsImpl_Injected(*mutcrate::unity_engine::rect::Rect, i32, i32, bool)` overload"]
1130 fn read_pixels_impl_injected(
1131 self,
1132 dest_x: impl ::core::convert::Into<i32>,
1133 dest_y: impl ::core::convert::Into<i32>,
1134 recalculate_mip_maps: impl ::core::convert::Into<bool>,
1135 ) -> crate::unity_engine::rect::Rect {
1136 unsafe {
1137 let __receiver = <Texture2D as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
1138 let mut __out_0 = ::core::mem::MaybeUninit::<crate::unity_engine::rect::Rect>::uninit();
1139 ::unity::il2cpp_call!((::unity::module_base()+0x378a870usize)as*mut u8,();
1140(Texture2D)__receiver,(*mut crate::unity_engine::rect::Rect)__out_0.as_mut_ptr(),(i32)::core::convert::Into::into(dest_x),(i32)::core::convert::Into::into(dest_y),(bool)::core::convert::Into::into(recalculate_mip_maps));
1141 __out_0.assume_init()
1142 }
1143 }
1144}
1145
1146#[cfg(feature = "unity_engine-texture2d")]
1147impl<__T: ITexture2D> ITexture2DMethods for __T {}
1148
1149#[cfg(feature = "unity_engine-texture2d")]
1150impl Texture2D {
1151 pub fn get_format_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1152 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
1153 }
1154
1155 pub fn get_white_texture_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1156 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
1157 }
1158
1159 pub fn get_black_texture_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1160 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
1161 }
1162
1163 pub fn get_red_texture_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1164 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
1165 }
1166
1167 pub fn get_gray_texture_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1168 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
1169 }
1170
1171 pub fn get_linear_gray_texture_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1172 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
1173 }
1174
1175 pub fn get_normal_texture_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1176 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
1177 }
1178
1179 pub fn compress_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1180 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
1181 }
1182
1183 pub fn internal_create_impl_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1184 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
1185 }
1186
1187 pub fn internal_create_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1188 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
1189 }
1190
1191 pub fn get_is_readable_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1192 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
1193 }
1194
1195 pub fn get_vt_only_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1196 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
1197 }
1198
1199 pub fn apply_impl_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1200 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
1201 }
1202
1203 pub fn resize_impl_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1204 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
1205 }
1206
1207 pub fn set_pixel_impl_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1208 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
1209 }
1210
1211 pub fn get_pixel_impl_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1212 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
1213 }
1214
1215 pub fn get_pixel_bilinear_impl_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1216 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[16]
1217 }
1218
1219 pub fn resize_with_format_impl_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1220 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[17]
1221 }
1222
1223 pub fn read_pixels_impl_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1224 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[18]
1225 }
1226
1227 pub fn set_pixels_impl_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1228 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[19]
1229 }
1230
1231 pub fn load_raw_texture_data_impl_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1232 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[20]
1233 }
1234
1235 pub fn load_raw_texture_data_impl_array_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1236 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[21]
1237 }
1238
1239 pub fn set_pixel_data_impl_array_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1240 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[22]
1241 }
1242
1243 pub fn set_pixel_data_impl_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1244 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[23]
1245 }
1246
1247 pub fn get_writable_image_data_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1248 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[24]
1249 }
1250
1251 pub fn get_raw_image_data_size_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1252 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[25]
1253 }
1254
1255 pub fn generate_atlas_impl_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1256 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[26]
1257 }
1258
1259 pub fn get_is_pre_processed_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1260 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[27]
1261 }
1262
1263 pub fn get_streaming_mipmaps_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1264 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[28]
1265 }
1266
1267 pub fn get_streaming_mipmaps_priority_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1268 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[29]
1269 }
1270
1271 pub fn get_requested_mipmap_level_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1272 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[30]
1273 }
1274
1275 pub fn set_requested_mipmap_level_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1276 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[31]
1277 }
1278
1279 pub fn get_minimum_mipmap_level_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1280 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[32]
1281 }
1282
1283 pub fn set_minimum_mipmap_level_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1284 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[33]
1285 }
1286
1287 pub fn get_load_all_mips_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1288 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[34]
1289 }
1290
1291 pub fn set_load_all_mips_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1292 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[35]
1293 }
1294
1295 pub fn get_calculated_mipmap_level_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1296 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[36]
1297 }
1298
1299 pub fn get_desired_mipmap_level_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1300 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[37]
1301 }
1302
1303 pub fn get_loading_mipmap_level_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1304 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[38]
1305 }
1306
1307 pub fn get_loaded_mipmap_level_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1308 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[39]
1309 }
1310
1311 pub fn clear_requested_mipmap_level_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1312 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[40]
1313 }
1314
1315 pub fn is_requested_mipmap_level_loaded_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1316 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[41]
1317 }
1318
1319 pub fn clear_minimum_mipmap_level_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1320 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[42]
1321 }
1322
1323 pub fn update_external_texture_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1324 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[43]
1325 }
1326
1327 pub fn set_all_pixels32_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1328 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[44]
1329 }
1330
1331 pub fn set_block_of_pixels32_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1332 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[45]
1333 }
1334
1335 pub fn get_raw_texture_data_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1336 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[46]
1337 }
1338
1339 pub fn get_pixels_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1340 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[47]
1341 }
1342
1343 pub fn get_pixels_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1344 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[48]
1345 }
1346
1347 pub fn get_pixels32_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1348 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[49]
1349 }
1350
1351 pub fn get_pixels32_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1352 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[50]
1353 }
1354
1355 pub fn pack_textures_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1356 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[51]
1357 }
1358
1359 pub fn pack_textures_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1360 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[52]
1361 }
1362
1363 pub fn pack_textures_3_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1364 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[53]
1365 }
1366
1367 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1368 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[54]
1369 }
1370
1371 pub fn ctor_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1372 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[55]
1373 }
1374
1375 pub fn ctor_3_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1376 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[56]
1377 }
1378
1379 pub fn ctor_4_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1380 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[57]
1381 }
1382
1383 pub fn ctor_5_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1384 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[58]
1385 }
1386
1387 pub fn ctor_6_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1388 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[59]
1389 }
1390
1391 pub fn ctor_7_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1392 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[60]
1393 }
1394
1395 pub fn ctor_8_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1396 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[61]
1397 }
1398
1399 pub fn ctor_9_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1400 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[62]
1401 }
1402
1403 pub fn create_external_texture_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1404 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[63]
1405 }
1406
1407 pub fn set_pixel_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1408 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[64]
1409 }
1410
1411 pub fn set_pixel_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1412 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[65]
1413 }
1414
1415 pub fn set_pixels_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1416 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[66]
1417 }
1418
1419 pub fn set_pixels_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1420 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[67]
1421 }
1422
1423 pub fn set_pixels_3_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1424 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[68]
1425 }
1426
1427 pub fn set_pixels_4_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1428 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[69]
1429 }
1430
1431 pub fn get_pixel_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1432 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[70]
1433 }
1434
1435 pub fn get_pixel_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1436 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[71]
1437 }
1438
1439 pub fn get_pixel_bilinear_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1440 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[72]
1441 }
1442
1443 pub fn get_pixel_bilinear_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1444 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[73]
1445 }
1446
1447 pub fn load_raw_texture_data_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1448 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[74]
1449 }
1450
1451 pub fn load_raw_texture_data_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1452 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[75]
1453 }
1454
1455 pub fn apply_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1456 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[81]
1457 }
1458
1459 pub fn apply_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1460 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[82]
1461 }
1462
1463 pub fn apply_3_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1464 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[83]
1465 }
1466
1467 pub fn resize_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1468 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[84]
1469 }
1470
1471 pub fn resize_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1472 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[85]
1473 }
1474
1475 pub fn resize_3_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1476 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[86]
1477 }
1478
1479 pub fn read_pixels_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1480 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[87]
1481 }
1482
1483 pub fn read_pixels_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1484 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[88]
1485 }
1486
1487 pub fn generate_atlas_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1488 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[89]
1489 }
1490
1491 pub fn set_pixels32_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1492 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[90]
1493 }
1494
1495 pub fn set_pixels32_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1496 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[91]
1497 }
1498
1499 pub fn set_pixels32_3_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1500 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[92]
1501 }
1502
1503 pub fn set_pixels32_4_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1504 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[93]
1505 }
1506
1507 pub fn get_pixels_3_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1508 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[94]
1509 }
1510
1511 pub fn get_pixels_4_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1512 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[95]
1513 }
1514
1515 pub fn set_pixel_impl_injected_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1516 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[96]
1517 }
1518
1519 pub fn get_pixel_impl_injected_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1520 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[97]
1521 }
1522
1523 pub fn get_pixel_bilinear_impl_injected_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1524 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[98]
1525 }
1526
1527 pub fn read_pixels_impl_injected_method_info() -> &'static ::unity::il2cpp::MethodInfo {
1528 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[99]
1529 }
1530}
1531
1532#[cfg(feature = "unity_engine-texture2d")]
1533impl Texture2D {
1534 #[doc = "Direct (non-virtual) call to `Texture2D`'s own `get_isReadable`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
1535 pub unsafe fn get_is_readable(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
1536 let __mi = Self::get_is_readable_method_info();
1537 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
1538 __inner(this.into(), ::core::option::Option::None)
1539 }
1540}
1541
1542#[cfg(feature = "unity_engine-texture2d")]
1543impl Texture2D {
1544 #[doc = "`.ctor(i32, i32, crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat, crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags, i32, ::unity::IntPtr)` — overload selector"]
1545 pub fn new(
1546 width: i32,
1547 height: i32,
1548 format: crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat,
1549 flags: crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags,
1550 mip_count: i32,
1551 native_tex: ::unity::IntPtr,
1552 ) -> Self {
1553 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
1554 panic!(
1555 "{}
1556::{}
1557 failed to instantiate",
1558 ::core::stringify!(Texture2D),
1559 ::core::stringify!(new),
1560 )
1561 });
1562 <Self as ITexture2DMethods>::ctor(this, width, height, format, flags, mip_count, native_tex);
1563 this
1564 }
1565
1566 #[doc = "`.ctor(i32, i32, crate::unity_engine::experimental::rendering::defaultformat::DefaultFormat, crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags)` — overload selector"]
1567 pub fn new_2(
1568 width: i32,
1569 height: i32,
1570 format: crate::unity_engine::experimental::rendering::defaultformat::DefaultFormat,
1571 flags: crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags,
1572 ) -> Self {
1573 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
1574 panic!(
1575 "{}
1576::{}
1577 failed to instantiate",
1578 ::core::stringify!(Texture2D),
1579 ::core::stringify!(new_2),
1580 )
1581 });
1582 <Self as ITexture2DMethods>::ctor_2(this, width, height, format, flags);
1583 this
1584 }
1585
1586 #[doc = "`.ctor(i32, i32, crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat, crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags)` — overload selector"]
1587 pub fn new_3(
1588 width: i32,
1589 height: i32,
1590 format: crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat,
1591 flags: crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags,
1592 ) -> Self {
1593 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
1594 panic!(
1595 "{}
1596::{}
1597 failed to instantiate",
1598 ::core::stringify!(Texture2D),
1599 ::core::stringify!(new_3),
1600 )
1601 });
1602 <Self as ITexture2DMethods>::ctor_3(this, width, height, format, flags);
1603 this
1604 }
1605
1606 #[doc = "`.ctor(i32, i32, crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat, i32, crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags)` — overload selector"]
1607 pub fn new_4(
1608 width: i32,
1609 height: i32,
1610 format: crate::unity_engine::experimental::rendering::graphicsformat::GraphicsFormat,
1611 mip_count: i32,
1612 flags: crate::unity_engine::experimental::rendering::texturecreationflags::TextureCreationFlags,
1613 ) -> Self {
1614 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
1615 panic!(
1616 "{}
1617::{}
1618 failed to instantiate",
1619 ::core::stringify!(Texture2D),
1620 ::core::stringify!(new_4),
1621 )
1622 });
1623 <Self as ITexture2DMethods>::ctor_4(this, width, height, format, mip_count, flags);
1624 this
1625 }
1626
1627 #[doc = "`.ctor(i32, i32, crate::unity_engine::textureformat::TextureFormat, i32, bool, ::unity::IntPtr)` — overload selector"]
1628 pub fn new_5(
1629 width: i32,
1630 height: i32,
1631 texture_format: crate::unity_engine::textureformat::TextureFormat,
1632 mip_count: i32,
1633 linear: bool,
1634 native_tex: ::unity::IntPtr,
1635 ) -> Self {
1636 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
1637 panic!(
1638 "{}
1639::{}
1640 failed to instantiate",
1641 ::core::stringify!(Texture2D),
1642 ::core::stringify!(new_5),
1643 )
1644 });
1645 <Self as ITexture2DMethods>::ctor_5(this, width, height, texture_format, mip_count, linear, native_tex);
1646 this
1647 }
1648
1649 #[doc = "`.ctor(i32, i32, crate::unity_engine::textureformat::TextureFormat, i32, bool)` — overload selector"]
1650 pub fn new_6(width: i32, height: i32, texture_format: crate::unity_engine::textureformat::TextureFormat, mip_count: i32, linear: bool) -> Self {
1651 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
1652 panic!(
1653 "{}
1654::{}
1655 failed to instantiate",
1656 ::core::stringify!(Texture2D),
1657 ::core::stringify!(new_6),
1658 )
1659 });
1660 <Self as ITexture2DMethods>::ctor_6(this, width, height, texture_format, mip_count, linear);
1661 this
1662 }
1663
1664 #[doc = "`.ctor(i32, i32, crate::unity_engine::textureformat::TextureFormat, bool, bool)` — overload selector"]
1665 pub fn new_7(width: i32, height: i32, texture_format: crate::unity_engine::textureformat::TextureFormat, mip_chain: bool, linear: bool) -> Self {
1666 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
1667 panic!(
1668 "{}
1669::{}
1670 failed to instantiate",
1671 ::core::stringify!(Texture2D),
1672 ::core::stringify!(new_7),
1673 )
1674 });
1675 <Self as ITexture2DMethods>::ctor_7(this, width, height, texture_format, mip_chain, linear);
1676 this
1677 }
1678
1679 #[doc = "`.ctor(i32, i32, crate::unity_engine::textureformat::TextureFormat, bool)` — overload selector"]
1680 pub fn new_8(width: i32, height: i32, texture_format: crate::unity_engine::textureformat::TextureFormat, mip_chain: bool) -> Self {
1681 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
1682 panic!(
1683 "{}
1684::{}
1685 failed to instantiate",
1686 ::core::stringify!(Texture2D),
1687 ::core::stringify!(new_8),
1688 )
1689 });
1690 <Self as ITexture2DMethods>::ctor_8(this, width, height, texture_format, mip_chain);
1691 this
1692 }
1693
1694 #[doc = "`.ctor(i32, i32)` — overload selector"]
1695 pub fn new_9(width: i32, height: i32) -> Self {
1696 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
1697 panic!(
1698 "{}
1699::{}
1700 failed to instantiate",
1701 ::core::stringify!(Texture2D),
1702 ::core::stringify!(new_9),
1703 )
1704 });
1705 <Self as ITexture2DMethods>::ctor_9(this, width, height);
1706 this
1707 }
1708}
1709
1710#[cfg(feature = "unity_engine-texture2d")]
1711#[doc(hidden)]
1712pub mod prelude {
1713 pub use super::{ITexture2D, ITexture2DMethods, Texture2D};
1714 #[cfg(feature = "system-object")]
1715 pub use crate::system::object::IObjectMethods;
1716 #[cfg(feature = "unity_engine-object_2")]
1717 pub use crate::unity_engine::object_2::IObject_2Methods;
1718 #[cfg(feature = "unity_engine-texture")]
1719 pub use crate::unity_engine::texture::ITextureMethods;
1720 pub use crate::{
1721 system::object::IObject,
1722 unity_engine::{object_2::IObject_2, texture::ITexture},
1723 };
1724}