engage/generated/unity_engine/rendering/
dynamicresolutionhandler.rs1#[cfg(feature = "unity_engine-rendering-dynamicresolutionhandler-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::object::{IObject, Object};
9
10 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/rendering/dynamicresolutionhandler/DynamicResolutionHandler.md"))]
11 #[::unity::class(namespace = "UnityEngine.Rendering", name = "DynamicResolutionHandler")]
12 #[parent(crate::system::object::Object)]
13 pub struct DynamicResolutionHandler {
14 #[offset(16)]
15 #[rename(name = "m_Enabled")]
16 pub m_enabled: bool,
17 #[offset(20)]
18 #[rename(name = "m_MinScreenFraction")]
19 pub m_min_screen_fraction: f32,
20 #[offset(24)]
21 #[rename(name = "m_MaxScreenFraction")]
22 pub m_max_screen_fraction: f32,
23 #[offset(28)]
24 #[rename(name = "m_CurrentFraction")]
25 pub m_current_fraction: f32,
26 #[offset(32)]
27 #[rename(name = "m_PrevFraction")]
28 pub m_prev_fraction: f32,
29 #[offset(36)]
30 #[rename(name = "m_ForcingRes")]
31 pub m_forcing_res: bool,
32 #[offset(37)]
33 #[rename(name = "m_CurrentCameraRequest")]
34 pub m_current_camera_request: bool,
35 #[offset(38)]
36 #[rename(name = "m_ForceSoftwareFallback")]
37 pub m_force_software_fallback: bool,
38 #[offset(40)]
39 #[rename(name = "m_PrevHWScaleWidth")]
40 pub m_prev_hw_scale_width: f32,
41 #[offset(44)]
42 #[rename(name = "m_PrevHWScaleHeight")]
43 pub m_prev_hw_scale_height: f32,
44 #[offset(48)]
45 #[rename(name = "m_LastScaledSize")]
46 pub m_last_scaled_size: crate::unity_engine::vector2int::Vector2Int,
47 #[offset(56)]
48 #[rename(name = "m_ScalerType")]
49 pub m_scaler_type: crate::unity_engine::rendering::dynamicresscalepolicytype::DynamicResScalePolicyType,
50 #[offset(60)]
51 #[rename(name = "cachedOriginalSize")]
52 pub cached_original_size: crate::unity_engine::vector2int::Vector2Int,
53 #[offset(80)]
54 #[rename(name = "type")]
55 pub r#type: crate::unity_engine::rendering::dynamicresolutiontype::DynamicResolutionType,
56 #[offset(88)]
57 #[rename(name = "m_DynamicResMethod")]
58 pub m_dynamic_res_method: crate::unity_engine::rendering::performdynamicres::PerformDynamicRes,
59 #[static_field]
60 #[rename(name = "s_Instance")]
61 pub s_instance: crate::unity_engine::rendering::dynamicresolutionhandler::DynamicResolutionHandler,
62 }
63}
64
65#[cfg(feature = "unity_engine-rendering-dynamicresolutionhandler-types")]
66pub use __types::*;
67
68#[cfg(feature = "unity_engine-rendering-dynamicresolutionhandler")]
69impl DynamicResolutionHandler {
70 #[doc = "`get_instance()` overload"]
71 pub fn get_instance() -> crate::unity_engine::rendering::dynamicresolutionhandler::DynamicResolutionHandler {
72 unsafe {
73 ::unity::il2cpp_call!((::unity::module_base()+0x30a9350usize)as*mut u8,crate::unity_engine::rendering::dynamicresolutionhandler::DynamicResolutionHandler;
74 )
75 }
76 }
77
78 #[doc = "`DefaultDynamicResMethod()` overload"]
79 pub fn default_dynamic_res_method() -> f32 {
80 unsafe {
81 ::unity::il2cpp_call!((::unity::module_base()+0x30a94b0usize)as*mut u8,f32;
82 )
83 }
84 }
85
86 #[doc = "`SetDynamicResScaler(crate::unity_engine::rendering::performdynamicres::PerformDynamicRes, crate::unity_engine::rendering::dynamicresscalepolicytype::DynamicResScalePolicyType)` overload"]
87 pub fn set_dynamic_res_scaler(
88 scaler: impl ::core::convert::Into<crate::unity_engine::rendering::performdynamicres::PerformDynamicRes>,
89 scaler_type: impl ::core::convert::Into<crate::unity_engine::rendering::dynamicresscalepolicytype::DynamicResScalePolicyType>,
90 ) -> () {
91 unsafe {
92 ::unity::il2cpp_call!((::unity::module_base()+0x30a95d0usize)as*mut u8,();
93(crate::unity_engine::rendering::performdynamicres::PerformDynamicRes)::core::convert::Into::into(scaler),(crate::unity_engine::rendering::dynamicresscalepolicytype::DynamicResScalePolicyType)::core::convert::Into::into(scaler_type))
94 }
95 }
96
97 #[doc = "`.cctor()` overload"]
98 pub fn cctor() -> () {
99 unsafe {
100 ::unity::il2cpp_call!((::unity::module_base()+0x30a9bd0usize)as*mut u8,();
101 )
102 }
103 }
104}
105
106#[cfg(feature = "unity_engine-rendering-dynamicresolutionhandler")]
107pub trait IDynamicResolutionHandlerMethods: IDynamicResolutionHandler {
108 #[doc = "`get_filter()` overload"]
109 fn get_filter(self) -> crate::unity_engine::rendering::dynamicresupscalefilter::DynamicResUpscaleFilter {
110 unsafe {
111 let __receiver =
112 <DynamicResolutionHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
113 ::unity::il2cpp_call!((::unity::module_base()+0x30a9310usize)as*mut u8,crate::unity_engine::rendering::dynamicresupscalefilter::DynamicResUpscaleFilter;
114(DynamicResolutionHandler)__receiver)
115 }
116 }
117 #[doc = "`set_filter(crate::unity_engine::rendering::dynamicresupscalefilter::DynamicResUpscaleFilter)` overload"]
118 fn set_filter(self, value: impl ::core::convert::Into<crate::unity_engine::rendering::dynamicresupscalefilter::DynamicResUpscaleFilter>) -> () {
119 unsafe {
120 let __receiver =
121 <DynamicResolutionHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
122 ::unity::il2cpp_call!((::unity::module_base()+0x30a9320usize)as*mut u8,();
123(DynamicResolutionHandler)__receiver,(crate::unity_engine::rendering::dynamicresupscalefilter::DynamicResUpscaleFilter)::core::convert::Into::into(value))
124 }
125 }
126 #[doc = "`get_finalViewport()` overload"]
127 fn get_final_viewport(self) -> crate::unity_engine::vector2int::Vector2Int {
128 unsafe {
129 let __receiver =
130 <DynamicResolutionHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
131 ::unity::il2cpp_call!((::unity::module_base()+0x30a9330usize)as*mut u8,crate::unity_engine::vector2int::Vector2Int;
132(DynamicResolutionHandler)__receiver)
133 }
134 }
135 #[doc = "`set_finalViewport(crate::unity_engine::vector2int::Vector2Int)` overload"]
136 fn set_final_viewport(self, value: impl ::core::convert::Into<crate::unity_engine::vector2int::Vector2Int>) -> () {
137 unsafe {
138 let __receiver =
139 <DynamicResolutionHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
140 ::unity::il2cpp_call!((::unity::module_base()+0x30a9340usize)as*mut u8,();
141(DynamicResolutionHandler)__receiver,(crate::unity_engine::vector2int::Vector2Int)::core::convert::Into::into(value))
142 }
143 }
144 #[doc = "`.ctor()` overload"]
145 fn ctor(self) -> () {
146 unsafe {
147 let __receiver =
148 <DynamicResolutionHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
149 ::unity::il2cpp_call!((::unity::module_base()+0x30a93c0usize)as*mut u8,();
150(DynamicResolutionHandler)__receiver)
151 }
152 }
153 #[doc = "`ProcessSettings(crate::unity_engine::rendering::globaldynamicresolutionsettings::GlobalDynamicResolutionSettings)` overload"]
154 fn process_settings(
155 self,
156 settings: impl ::core::convert::Into<crate::unity_engine::rendering::globaldynamicresolutionsettings::GlobalDynamicResolutionSettings>,
157 ) -> () {
158 unsafe {
159 let __receiver =
160 <DynamicResolutionHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
161 ::unity::il2cpp_call!((::unity::module_base()+0x30a94c0usize)as*mut u8,();
162(DynamicResolutionHandler)__receiver,(crate::unity_engine::rendering::globaldynamicresolutionsettings::GlobalDynamicResolutionSettings)::core::convert::Into::into(settings))
163 }
164 }
165 #[doc = "`SetCurrentCameraRequest(bool)` overload"]
166 fn set_current_camera_request(self, camera_request: impl ::core::convert::Into<bool>) -> () {
167 unsafe {
168 let __receiver =
169 <DynamicResolutionHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
170 ::unity::il2cpp_call!((::unity::module_base()+0x30a9660usize)as*mut u8,();
171(DynamicResolutionHandler)__receiver,(bool)::core::convert::Into::into(camera_request))
172 }
173 }
174 #[doc = "`Update(crate::unity_engine::rendering::globaldynamicresolutionsettings::GlobalDynamicResolutionSettings, crate::system::action::Action)` overload"]
175 fn update(
176 self,
177 settings: impl ::core::convert::Into<crate::unity_engine::rendering::globaldynamicresolutionsettings::GlobalDynamicResolutionSettings>,
178 on_resolution_change: impl ::core::convert::Into<crate::system::action::Action>,
179 ) -> () {
180 unsafe {
181 let __receiver =
182 <DynamicResolutionHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
183 ::unity::il2cpp_call!((::unity::module_base()+0x30a9670usize)as*mut u8,();
184(DynamicResolutionHandler)__receiver,(crate::unity_engine::rendering::globaldynamicresolutionsettings::GlobalDynamicResolutionSettings)::core::convert::Into::into(settings),(crate::system::action::Action)::core::convert::Into::into(on_resolution_change))
185 }
186 }
187 #[doc = "`SoftwareDynamicResIsEnabled()` overload"]
188 fn software_dynamic_res_is_enabled(self) -> bool {
189 unsafe {
190 let __receiver =
191 <DynamicResolutionHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
192 ::unity::il2cpp_call!((::unity::module_base()+0x30a99e0usize)as*mut u8,bool;
193(DynamicResolutionHandler)__receiver)
194 }
195 }
196 #[doc = "`HardwareDynamicResIsEnabled()` overload"]
197 fn hardware_dynamic_res_is_enabled(self) -> bool {
198 unsafe {
199 let __receiver =
200 <DynamicResolutionHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
201 ::unity::il2cpp_call!((::unity::module_base()+0x30a9a30usize)as*mut u8,bool;
202(DynamicResolutionHandler)__receiver)
203 }
204 }
205 #[doc = "`RequestsHardwareDynamicResolution()` overload"]
206 fn requests_hardware_dynamic_resolution(self) -> bool {
207 unsafe {
208 let __receiver =
209 <DynamicResolutionHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
210 ::unity::il2cpp_call!((::unity::module_base()+0x30a9a60usize)as*mut u8,bool;
211(DynamicResolutionHandler)__receiver)
212 }
213 }
214 #[doc = "`DynamicResolutionEnabled()` overload"]
215 fn dynamic_resolution_enabled(self) -> bool {
216 unsafe {
217 let __receiver =
218 <DynamicResolutionHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
219 ::unity::il2cpp_call!((::unity::module_base()+0x30a9a80usize)as*mut u8,bool;
220(DynamicResolutionHandler)__receiver)
221 }
222 }
223 #[doc = "`ForceSoftwareFallback()` overload"]
224 fn force_software_fallback(self) -> () {
225 unsafe {
226 let __receiver =
227 <DynamicResolutionHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
228 ::unity::il2cpp_call!((::unity::module_base()+0x30a9ab0usize)as*mut u8,();
229(DynamicResolutionHandler)__receiver)
230 }
231 }
232 #[doc = "`GetScaledSize(crate::unity_engine::vector2int::Vector2Int)` overload"]
233 fn get_scaled_size(
234 self,
235 size: impl ::core::convert::Into<crate::unity_engine::vector2int::Vector2Int>,
236 ) -> crate::unity_engine::vector2int::Vector2Int {
237 unsafe {
238 let __receiver =
239 <DynamicResolutionHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
240 ::unity::il2cpp_call!((::unity::module_base()+0x30a9ac0usize)as*mut u8,crate::unity_engine::vector2int::Vector2Int;
241(DynamicResolutionHandler)__receiver,(crate::unity_engine::vector2int::Vector2Int)::core::convert::Into::into(size))
242 }
243 }
244 #[doc = "`GetCurrentScale()` overload"]
245 fn get_current_scale(self) -> f32 {
246 unsafe {
247 let __receiver =
248 <DynamicResolutionHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
249 ::unity::il2cpp_call!((::unity::module_base()+0x30a9ba0usize)as*mut u8,f32;
250(DynamicResolutionHandler)__receiver)
251 }
252 }
253 #[doc = "`GetLastScaledSize()` overload"]
254 fn get_last_scaled_size(self) -> crate::unity_engine::vector2int::Vector2Int {
255 unsafe {
256 let __receiver =
257 <DynamicResolutionHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
258 ::unity::il2cpp_call!((::unity::module_base()+0x30a9bc0usize)as*mut u8,crate::unity_engine::vector2int::Vector2Int;
259(DynamicResolutionHandler)__receiver)
260 }
261 }
262}
263
264#[cfg(feature = "unity_engine-rendering-dynamicresolutionhandler")]
265impl<__T: IDynamicResolutionHandler> IDynamicResolutionHandlerMethods for __T {}
266
267#[cfg(feature = "unity_engine-rendering-dynamicresolutionhandler")]
268impl DynamicResolutionHandler {
269 pub fn get_filter_method_info() -> &'static ::unity::il2cpp::MethodInfo {
270 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
271 }
272
273 pub fn set_filter_method_info() -> &'static ::unity::il2cpp::MethodInfo {
274 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
275 }
276
277 pub fn get_final_viewport_method_info() -> &'static ::unity::il2cpp::MethodInfo {
278 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
279 }
280
281 pub fn set_final_viewport_method_info() -> &'static ::unity::il2cpp::MethodInfo {
282 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
283 }
284
285 pub fn get_instance_method_info() -> &'static ::unity::il2cpp::MethodInfo {
286 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
287 }
288
289 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
290 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
291 }
292
293 pub fn default_dynamic_res_method_method_info() -> &'static ::unity::il2cpp::MethodInfo {
294 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
295 }
296
297 pub fn process_settings_method_info() -> &'static ::unity::il2cpp::MethodInfo {
298 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
299 }
300
301 pub fn set_dynamic_res_scaler_method_info() -> &'static ::unity::il2cpp::MethodInfo {
302 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
303 }
304
305 pub fn set_current_camera_request_method_info() -> &'static ::unity::il2cpp::MethodInfo {
306 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
307 }
308
309 pub fn update_method_info() -> &'static ::unity::il2cpp::MethodInfo {
310 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
311 }
312
313 pub fn software_dynamic_res_is_enabled_method_info() -> &'static ::unity::il2cpp::MethodInfo {
314 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
315 }
316
317 pub fn hardware_dynamic_res_is_enabled_method_info() -> &'static ::unity::il2cpp::MethodInfo {
318 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
319 }
320
321 pub fn requests_hardware_dynamic_resolution_method_info() -> &'static ::unity::il2cpp::MethodInfo {
322 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
323 }
324
325 pub fn dynamic_resolution_enabled_method_info() -> &'static ::unity::il2cpp::MethodInfo {
326 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
327 }
328
329 pub fn force_software_fallback_method_info() -> &'static ::unity::il2cpp::MethodInfo {
330 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
331 }
332
333 pub fn get_scaled_size_method_info() -> &'static ::unity::il2cpp::MethodInfo {
334 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[16]
335 }
336
337 pub fn get_current_scale_method_info() -> &'static ::unity::il2cpp::MethodInfo {
338 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[17]
339 }
340
341 pub fn get_last_scaled_size_method_info() -> &'static ::unity::il2cpp::MethodInfo {
342 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[18]
343 }
344
345 pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
346 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[19]
347 }
348}
349
350#[cfg(feature = "unity_engine-rendering-dynamicresolutionhandler")]
351impl DynamicResolutionHandler {
352 #[doc = "`.ctor()` — no args"]
353 pub fn new() -> Self {
354 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
355 panic!(
356 "{}
357::{}
358 failed to instantiate",
359 ::core::stringify!(DynamicResolutionHandler),
360 ::core::stringify!(new),
361 )
362 });
363 <Self as IDynamicResolutionHandlerMethods>::ctor(this);
364 this
365 }
366}
367
368#[cfg(feature = "unity_engine-rendering-dynamicresolutionhandler")]
369#[doc(hidden)]
370pub mod prelude {
371 pub use super::{DynamicResolutionHandler, IDynamicResolutionHandler, IDynamicResolutionHandlerMethods};
372 pub use crate::system::object::IObject;
373 #[cfg(feature = "system-object")]
374 pub use crate::system::object::IObjectMethods;
375}