engage/generated/unity_engine/xr/
xrsettings.rs1#[cfg(feature = "unity_engine-xr-xrsettings-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::{
9 object::{IObject, Object},
10 r#enum::{Enum, IEnum},
11 valuetype::{IValueType, ValueType},
12 };
13
14 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/xr/xrsettings/XRSettings_StereoRenderingMode.md"))]
15 #[repr(C)]
16 #[derive(::core::clone::Clone, ::core::marker::Copy, ::core::fmt::Debug, ::core::cmp::PartialEq, ::core::cmp::Eq)]
17 pub struct XRSettings_StereoRenderingMode {
18 pub value: i32,
19 }
20 impl ::unity::ClassIdentity for XRSettings_StereoRenderingMode {
21 const NAME: &'static str = "XRSettings.StereoRenderingMode";
22 const NAMESPACE: &'static str = "UnityEngine.XR";
23
24 fn class() -> ::unity::Class {
25 static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
26 *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
27 }
28 }
29 impl ::unity::IlType for XRSettings_StereoRenderingMode {
30 fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
31 &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
32 }
33 }
34 impl XRSettings_StereoRenderingMode {
35 pub fn multi_pass() -> Self {
36 Self { value: 0 }
37 }
38
39 pub fn single_pass() -> Self {
40 Self { value: 1 }
41 }
42
43 pub fn single_pass_instanced() -> Self {
44 Self { value: 2 }
45 }
46
47 pub fn single_pass_multiview() -> Self {
48 Self { value: 3 }
49 }
50 }
51
52 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/xr/xrsettings/XRSettings.md"))]
53 #[::unity::class(namespace = "UnityEngine.XR", name = "XRSettings")]
54 #[parent(crate::system::object::Object)]
55 pub struct XRSettings {}
56}
57
58#[cfg(feature = "unity_engine-xr-xrsettings-types")]
59pub use __types::*;
60
61#[cfg(feature = "unity_engine-xr-xrsettings")]
62impl XRSettings {
63 #[doc = "`get_enabled()` overload"]
64 pub fn get_enabled() -> bool {
65 unsafe {
66 ::unity::il2cpp_call!((::unity::module_base()+0x3f46610usize)as*mut u8,bool;
67 )
68 }
69 }
70
71 #[doc = "`get_isDeviceActive()` overload"]
72 pub fn get_is_device_active() -> bool {
73 unsafe {
74 ::unity::il2cpp_call!((::unity::module_base()+0x3f46650usize)as*mut u8,bool;
75 )
76 }
77 }
78
79 #[doc = "`get_eyeTextureResolutionScale()` overload"]
80 pub fn get_eye_texture_resolution_scale() -> f32 {
81 unsafe {
82 ::unity::il2cpp_call!((::unity::module_base()+0x3f46690usize)as*mut u8,f32;
83 )
84 }
85 }
86
87 #[doc = "`set_eyeTextureResolutionScale(f32)` overload"]
88 pub fn set_eye_texture_resolution_scale(value: impl ::core::convert::Into<f32>) -> () {
89 unsafe {
90 ::unity::il2cpp_call!((::unity::module_base()+0x3f466d0usize)as*mut u8,();
91(f32)::core::convert::Into::into(value))
92 }
93 }
94
95 #[doc = "`get_eyeTextureWidth()` overload"]
96 pub fn get_eye_texture_width() -> i32 {
97 unsafe {
98 ::unity::il2cpp_call!((::unity::module_base()+0x3f46720usize)as*mut u8,i32;
99 )
100 }
101 }
102
103 #[doc = "`get_eyeTextureHeight()` overload"]
104 pub fn get_eye_texture_height() -> i32 {
105 unsafe {
106 ::unity::il2cpp_call!((::unity::module_base()+0x3f46760usize)as*mut u8,i32;
107 )
108 }
109 }
110
111 #[doc = "`get_eyeTextureDesc()` overload"]
112 pub fn get_eye_texture_desc() -> crate::unity_engine::rendertexturedescriptor::RenderTextureDescriptor {
113 unsafe {
114 ::unity::il2cpp_call!((::unity::module_base()+0x3f467a0usize)as*mut u8,crate::unity_engine::rendertexturedescriptor::RenderTextureDescriptor;
115 )
116 }
117 }
118
119 #[doc = "`get_renderViewportScale()` overload"]
120 pub fn get_render_viewport_scale() -> f32 {
121 unsafe {
122 ::unity::il2cpp_call!((::unity::module_base()+0x3f46870usize)as*mut u8,f32;
123 )
124 }
125 }
126
127 #[doc = "`get_renderViewportScaleInternal()` overload"]
128 pub fn get_render_viewport_scale_internal() -> f32 {
129 unsafe {
130 ::unity::il2cpp_call!((::unity::module_base()+0x3f468b0usize)as*mut u8,f32;
131 )
132 }
133 }
134
135 #[doc = "`get_loadedDeviceName()` overload"]
136 pub fn get_loaded_device_name() -> ::unity::Il2CppString {
137 unsafe {
138 ::unity::il2cpp_call!((::unity::module_base()+0x3f468f0usize)as*mut u8, ::unity::Il2CppString;
139 )
140 }
141 }
142
143 #[doc = "`get_supportedDevices()` overload"]
144 pub fn get_supported_devices() -> ::unity::Array<::unity::Il2CppString> {
145 unsafe {
146 ::unity::il2cpp_call!((::unity::module_base()+0x3f46930usize)as*mut u8, ::unity::Array< ::unity::Il2CppString> ;
147 )
148 }
149 }
150
151 #[doc = "`get_stereoRenderingMode()` overload"]
152 pub fn get_stereo_rendering_mode() -> crate::unity_engine::xr::xrsettings::XRSettings_StereoRenderingMode {
153 unsafe {
154 ::unity::il2cpp_call!((::unity::module_base()+0x3f46970usize)as*mut u8,crate::unity_engine::xr::xrsettings::XRSettings_StereoRenderingMode;
155 )
156 }
157 }
158
159 #[doc = "`get_eyeTextureDesc_Injected(*mutcrate::unity_engine::rendertexturedescriptor::RenderTextureDescriptor)` overload"]
160 pub fn get_eye_texture_desc_injected() -> crate::unity_engine::rendertexturedescriptor::RenderTextureDescriptor {
161 unsafe {
162 let mut __out_0 = ::core::mem::MaybeUninit::<crate::unity_engine::rendertexturedescriptor::RenderTextureDescriptor>::uninit();
163 ::unity::il2cpp_call!((::unity::module_base()+0x3f46820usize)as*mut u8,();
164(*mut crate::unity_engine::rendertexturedescriptor::RenderTextureDescriptor)__out_0.as_mut_ptr());
165 __out_0.assume_init()
166 }
167 }
168}
169
170#[cfg(feature = "unity_engine-xr-xrsettings")]
171impl XRSettings {
172 pub fn get_enabled_method_info() -> &'static ::unity::il2cpp::MethodInfo {
173 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
174 }
175
176 pub fn get_is_device_active_method_info() -> &'static ::unity::il2cpp::MethodInfo {
177 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
178 }
179
180 pub fn get_eye_texture_resolution_scale_method_info() -> &'static ::unity::il2cpp::MethodInfo {
181 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
182 }
183
184 pub fn set_eye_texture_resolution_scale_method_info() -> &'static ::unity::il2cpp::MethodInfo {
185 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
186 }
187
188 pub fn get_eye_texture_width_method_info() -> &'static ::unity::il2cpp::MethodInfo {
189 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
190 }
191
192 pub fn get_eye_texture_height_method_info() -> &'static ::unity::il2cpp::MethodInfo {
193 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
194 }
195
196 pub fn get_eye_texture_desc_method_info() -> &'static ::unity::il2cpp::MethodInfo {
197 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
198 }
199
200 pub fn get_render_viewport_scale_method_info() -> &'static ::unity::il2cpp::MethodInfo {
201 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
202 }
203
204 pub fn get_render_viewport_scale_internal_method_info() -> &'static ::unity::il2cpp::MethodInfo {
205 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
206 }
207
208 pub fn get_loaded_device_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
209 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
210 }
211
212 pub fn get_supported_devices_method_info() -> &'static ::unity::il2cpp::MethodInfo {
213 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
214 }
215
216 pub fn get_stereo_rendering_mode_method_info() -> &'static ::unity::il2cpp::MethodInfo {
217 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
218 }
219
220 pub fn get_eye_texture_desc_injected_method_info() -> &'static ::unity::il2cpp::MethodInfo {
221 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
222 }
223}
224
225#[cfg(feature = "unity_engine-xr-xrsettings")]
226#[doc(hidden)]
227pub mod prelude {
228 pub use super::{IXRSettings, XRSettings, XRSettings_StereoRenderingMode};
229 #[cfg(feature = "system-object")]
230 pub use crate::system::object::IObjectMethods;
231 #[cfg(feature = "system-enum")]
232 pub use crate::system::r#enum::IEnumMethods;
233 #[cfg(feature = "system-valuetype")]
234 pub use crate::system::valuetype::IValueTypeMethods;
235 pub use crate::system::{object::IObject, r#enum::IEnum, valuetype::IValueType};
236}