engage/generated/unity_engine/
colorusageattribute.rs1#[cfg(feature = "unity_engine-colorusageattribute-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::propertyattribute::{IPropertyAttribute, PropertyAttribute},
11 };
12
13 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/colorusageattribute/ColorUsageAttribute.md"))]
14 #[::unity::class(namespace = "UnityEngine", name = "ColorUsageAttribute")]
15 #[parent(crate::unity_engine::propertyattribute::PropertyAttribute)]
16 pub struct ColorUsageAttribute {
17 #[offset(16)]
18 #[rename(name = "showAlpha")]
19 pub show_alpha: bool,
20 #[offset(17)]
21 #[rename(name = "hdr")]
22 pub hdr: bool,
23 #[offset(20)]
24 #[rename(name = "minBrightness")]
25 pub min_brightness: f32,
26 #[offset(24)]
27 #[rename(name = "maxBrightness")]
28 pub max_brightness: f32,
29 #[offset(28)]
30 #[rename(name = "minExposureValue")]
31 pub min_exposure_value: f32,
32 #[offset(32)]
33 #[rename(name = "maxExposureValue")]
34 pub max_exposure_value: f32,
35 }
36}
37
38#[cfg(feature = "unity_engine-colorusageattribute-types")]
39pub use __types::*;
40
41#[cfg(feature = "unity_engine-colorusageattribute")]
42pub trait IColorUsageAttributeMethods: IColorUsageAttribute {
43 #[doc = "`.ctor(bool)` overload"]
44 fn ctor(self, show_alpha: impl ::core::convert::Into<bool>) -> () {
45 unsafe {
46 let __receiver = <ColorUsageAttribute as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
47 ::unity::il2cpp_call!((::unity::module_base()+0x2c41ac0usize)as*mut u8,();
48(ColorUsageAttribute)__receiver,(bool)::core::convert::Into::into(show_alpha))
49 }
50 }
51 #[doc = "`.ctor(bool, bool)` overload"]
52 fn ctor_2(self, show_alpha: impl ::core::convert::Into<bool>, hdr: impl ::core::convert::Into<bool>) -> () {
53 unsafe {
54 let __receiver = <ColorUsageAttribute as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
55 ::unity::il2cpp_call!((::unity::module_base()+0x2c41b10usize)as*mut u8,();
56(ColorUsageAttribute)__receiver,(bool)::core::convert::Into::into(show_alpha),(bool)::core::convert::Into::into(hdr))
57 }
58 }
59}
60
61#[cfg(feature = "unity_engine-colorusageattribute")]
62impl<__T: IColorUsageAttribute> IColorUsageAttributeMethods for __T {}
63
64#[cfg(feature = "unity_engine-colorusageattribute")]
65impl ColorUsageAttribute {
66 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
67 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
68 }
69
70 pub fn ctor_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
71 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
72 }
73}
74
75#[cfg(feature = "unity_engine-colorusageattribute")]
76impl ColorUsageAttribute {
77 #[doc = "`.ctor(bool)` — overload selector"]
78 pub fn new(show_alpha: bool) -> Self {
79 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
80 panic!(
81 "{}
82::{}
83 failed to instantiate",
84 ::core::stringify!(ColorUsageAttribute),
85 ::core::stringify!(new),
86 )
87 });
88 <Self as IColorUsageAttributeMethods>::ctor(this, show_alpha);
89 this
90 }
91
92 #[doc = "`.ctor(bool, bool)` — overload selector"]
93 pub fn new_2(show_alpha: bool, hdr: bool) -> Self {
94 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
95 panic!(
96 "{}
97::{}
98 failed to instantiate",
99 ::core::stringify!(ColorUsageAttribute),
100 ::core::stringify!(new_2),
101 )
102 });
103 <Self as IColorUsageAttributeMethods>::ctor_2(this, show_alpha, hdr);
104 this
105 }
106}
107
108#[cfg(feature = "unity_engine-colorusageattribute")]
109#[doc(hidden)]
110pub mod prelude {
111 pub use super::{ColorUsageAttribute, IColorUsageAttribute, IColorUsageAttributeMethods};
112 #[cfg(feature = "system-object")]
113 pub use crate::system::object::IObjectMethods;
114 #[cfg(feature = "unity_engine-propertyattribute")]
115 pub use crate::unity_engine::propertyattribute::IPropertyAttributeMethods;
116 pub use crate::{system::object::IObject, unity_engine::propertyattribute::IPropertyAttribute};
117}