engage/generated/unity_engine/ui/
shadow.rs1#[cfg(feature = "unity_engine-ui-shadow-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 behaviour::{Behaviour, IBehaviour},
12 component::{Component, IComponent},
13 event_systems::uibehaviour::{IUIBehaviour, UIBehaviour},
14 monobehaviour::{IMonoBehaviour, MonoBehaviour},
15 object_2::{IObject_2, Object_2},
16 ui::basemesheffect::{BaseMeshEffect, IBaseMeshEffect},
17 },
18 };
19
20 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/ui/shadow/Shadow.md"))]
21 #[::unity::class(namespace = "UnityEngine.UI", name = "Shadow")]
22 #[parent(crate::unity_engine::ui::basemesheffect::BaseMeshEffect)]
23 pub struct Shadow {
24 #[offset(32)]
25 #[rename(name = "m_EffectColor")]
26 pub m_effect_color: crate::unity_engine::color::Color,
27 #[offset(48)]
28 #[rename(name = "m_EffectDistance")]
29 pub m_effect_distance: crate::unity_engine::vector2::Vector2,
30 #[offset(56)]
31 #[rename(name = "m_UseGraphicAlpha")]
32 pub m_use_graphic_alpha: bool,
33 #[static_field]
34 #[rename(name = "kMaxEffectDistance")]
35 pub k_max_effect_distance: f32,
36 }
37}
38
39#[cfg(feature = "unity_engine-ui-shadow-types")]
40pub use __types::*;
41
42#[cfg(feature = "unity_engine-ui-shadow")]
43pub trait IShadowMethods: IShadow {
44 #[doc = "`.ctor()` overload"]
45 fn ctor(self) -> () {
46 unsafe {
47 let __receiver = <Shadow as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
48 ::unity::il2cpp_call!((::unity::module_base()+0x371d920usize)as*mut u8,();
49(Shadow)__receiver)
50 }
51 }
52 #[doc = "`get_effectColor()` overload"]
53 fn get_effect_color(self) -> crate::unity_engine::color::Color {
54 unsafe {
55 let __receiver = <Shadow as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
56 ::unity::il2cpp_call!((::unity::module_base()+0x372e170usize)as*mut u8,crate::unity_engine::color::Color;
57(Shadow)__receiver)
58 }
59 }
60 #[doc = "`set_effectColor(crate::unity_engine::color::Color)` overload"]
61 fn set_effect_color(self, value: impl ::core::convert::Into<crate::unity_engine::color::Color>) -> () {
62 unsafe {
63 let __receiver = <Shadow as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
64 ::unity::il2cpp_call!((::unity::module_base()+0x372e180usize)as*mut u8,();
65(Shadow)__receiver,(crate::unity_engine::color::Color)::core::convert::Into::into(value))
66 }
67 }
68 #[doc = "`get_effectDistance()` overload"]
69 fn get_effect_distance(self) -> crate::unity_engine::vector2::Vector2 {
70 unsafe {
71 let __receiver = <Shadow as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
72 ::unity::il2cpp_call!((::unity::module_base()+0x372e260usize)as*mut u8,crate::unity_engine::vector2::Vector2;
73(Shadow)__receiver)
74 }
75 }
76 #[doc = "`set_effectDistance(crate::unity_engine::vector2::Vector2)` overload"]
77 fn set_effect_distance(self, value: impl ::core::convert::Into<crate::unity_engine::vector2::Vector2>) -> () {
78 unsafe {
79 let __receiver = <Shadow as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
80 ::unity::il2cpp_call!((::unity::module_base()+0x372e270usize)as*mut u8,();
81(Shadow)__receiver,(crate::unity_engine::vector2::Vector2)::core::convert::Into::into(value))
82 }
83 }
84 #[doc = "`get_useGraphicAlpha()` overload"]
85 fn get_use_graphic_alpha(self) -> bool {
86 unsafe {
87 let __receiver = <Shadow as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
88 ::unity::il2cpp_call!((::unity::module_base()+0x372e3b0usize)as*mut u8,bool;
89(Shadow)__receiver)
90 }
91 }
92 #[doc = "`set_useGraphicAlpha(bool)` overload"]
93 fn set_use_graphic_alpha(self, value: impl ::core::convert::Into<bool>) -> () {
94 unsafe {
95 let __receiver = <Shadow as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
96 ::unity::il2cpp_call!((::unity::module_base()+0x372e3c0usize)as*mut u8,();
97(Shadow)__receiver,(bool)::core::convert::Into::into(value))
98 }
99 }
100 #[doc = "`ApplyShadowZeroAlloc(crate::system::collections::generic::list_1::List_1<crate::unity_engine::uivertex::UIVertex>, crate::unity_engine::color32::Color32, i32, i32, f32, f32)` overload"]
101 fn apply_shadow_zero_alloc(
102 self,
103 verts: impl ::core::convert::Into<crate::system::collections::generic::list_1::List_1<crate::unity_engine::uivertex::UIVertex>>,
104 color: impl ::core::convert::Into<crate::unity_engine::color32::Color32>,
105 start: impl ::core::convert::Into<i32>,
106 end: impl ::core::convert::Into<i32>,
107 x: impl ::core::convert::Into<f32>,
108 y: impl ::core::convert::Into<f32>,
109 ) -> () {
110 unsafe {
111 let __receiver = <Shadow as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
112 ::unity::il2cpp_call!((::unity::module_base()+0x371dbf0usize)as*mut u8,();
113(Shadow)__receiver,(crate::system::collections::generic::list_1::List_1<crate::unity_engine::uivertex::UIVertex>)::core::convert::Into::into(verts),(crate::unity_engine::color32::Color32)::core::convert::Into::into(color),(i32)::core::convert::Into::into(start),(i32)::core::convert::Into::into(end),(f32)::core::convert::Into::into(x),(f32)::core::convert::Into::into(y))
114 }
115 }
116 #[doc = "`ApplyShadow(crate::system::collections::generic::list_1::List_1<crate::unity_engine::uivertex::UIVertex>, crate::unity_engine::color32::Color32, i32, i32, f32, f32)` overload"]
117 fn apply_shadow(
118 self,
119 verts: impl ::core::convert::Into<crate::system::collections::generic::list_1::List_1<crate::unity_engine::uivertex::UIVertex>>,
120 color: impl ::core::convert::Into<crate::unity_engine::color32::Color32>,
121 start: impl ::core::convert::Into<i32>,
122 end: impl ::core::convert::Into<i32>,
123 x: impl ::core::convert::Into<f32>,
124 y: impl ::core::convert::Into<f32>,
125 ) -> () {
126 unsafe {
127 let __receiver = <Shadow as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
128 ::unity::il2cpp_call!((::unity::module_base()+0x372e480usize)as*mut u8,();
129(Shadow)__receiver,(crate::system::collections::generic::list_1::List_1<crate::unity_engine::uivertex::UIVertex>)::core::convert::Into::into(verts),(crate::unity_engine::color32::Color32)::core::convert::Into::into(color),(i32)::core::convert::Into::into(start),(i32)::core::convert::Into::into(end),(f32)::core::convert::Into::into(x),(f32)::core::convert::Into::into(y))
130 }
131 }
132 #[doc = "`ModifyMesh(crate::unity_engine::ui::vertexhelper::VertexHelper)` overload"]
133 fn modify_mesh(self, vh: impl ::core::convert::Into<crate::unity_engine::ui::vertexhelper::VertexHelper>) -> () {
134 unsafe {
135 let __receiver = <Shadow as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
136 {
137 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
138 let __vi = *__vt.get(20usize).unwrap_or_else(|| {
139 panic!(
140 "unity: virtual slot {}
141 out of range (vtable len {}
142) on the runtime class behind {}
143 (method `{}
144`)",
145 20usize,
146 __vt.len(),
147 <Shadow as ::unity::ClassIdentity>::NAME,
148 "ModifyMesh",
149 )
150 });
151 let __inner: extern "C" fn(Shadow, crate::unity_engine::ui::vertexhelper::VertexHelper, ::unity::OptionalMethod) -> () =
152 ::core::mem::transmute(__vi.method_ptr);
153 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
154 __inner(__receiver, ::core::convert::Into::into(vh), __mi)
155 }
156 }
157 }
158}
159
160#[cfg(feature = "unity_engine-ui-shadow")]
161impl<__T: IShadow> IShadowMethods for __T {}
162
163#[cfg(feature = "unity_engine-ui-shadow")]
164impl Shadow {
165 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
166 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
167 }
168
169 pub fn get_effect_color_method_info() -> &'static ::unity::il2cpp::MethodInfo {
170 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
171 }
172
173 pub fn set_effect_color_method_info() -> &'static ::unity::il2cpp::MethodInfo {
174 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
175 }
176
177 pub fn get_effect_distance_method_info() -> &'static ::unity::il2cpp::MethodInfo {
178 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
179 }
180
181 pub fn set_effect_distance_method_info() -> &'static ::unity::il2cpp::MethodInfo {
182 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
183 }
184
185 pub fn get_use_graphic_alpha_method_info() -> &'static ::unity::il2cpp::MethodInfo {
186 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
187 }
188
189 pub fn set_use_graphic_alpha_method_info() -> &'static ::unity::il2cpp::MethodInfo {
190 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
191 }
192
193 pub fn apply_shadow_zero_alloc_method_info() -> &'static ::unity::il2cpp::MethodInfo {
194 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
195 }
196
197 pub fn apply_shadow_method_info() -> &'static ::unity::il2cpp::MethodInfo {
198 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
199 }
200
201 pub fn modify_mesh_method_info() -> &'static ::unity::il2cpp::MethodInfo {
202 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
203 }
204}
205
206#[cfg(feature = "unity_engine-ui-shadow")]
207impl Shadow {
208 #[doc = "Direct (non-virtual) call to `Shadow`'s own `ModifyMesh`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
209 pub unsafe fn modify_mesh(this: impl ::core::convert::Into<::unity::IlInstance>, vh: crate::unity_engine::ui::vertexhelper::VertexHelper) -> () {
210 let __mi = Self::modify_mesh_method_info();
211 let __inner: extern "C" fn(::unity::IlInstance, crate::unity_engine::ui::vertexhelper::VertexHelper, ::unity::OptionalMethod) -> () =
212 ::core::mem::transmute(__mi.method_ptr);
213 __inner(this.into(), vh, ::core::option::Option::None)
214 }
215}
216
217#[cfg(feature = "unity_engine-ui-shadow")]
218impl Shadow {
219 #[doc = "`.ctor()` — no args"]
220 pub fn new() -> Self {
221 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
222 panic!(
223 "{}
224::{}
225 failed to instantiate",
226 ::core::stringify!(Shadow),
227 ::core::stringify!(new),
228 )
229 });
230 <Self as IShadowMethods>::ctor(this);
231 this
232 }
233}
234
235#[cfg(feature = "unity_engine-ui-shadow")]
236#[doc(hidden)]
237pub mod prelude {
238 pub use super::{IShadow, IShadowMethods, Shadow};
239 #[cfg(feature = "system-object")]
240 pub use crate::system::object::IObjectMethods;
241 #[cfg(feature = "unity_engine-behaviour")]
242 pub use crate::unity_engine::behaviour::IBehaviourMethods;
243 #[cfg(feature = "unity_engine-component")]
244 pub use crate::unity_engine::component::IComponentMethods;
245 #[cfg(feature = "unity_engine-event_systems-uibehaviour")]
246 pub use crate::unity_engine::event_systems::uibehaviour::IUIBehaviourMethods;
247 #[cfg(feature = "unity_engine-monobehaviour")]
248 pub use crate::unity_engine::monobehaviour::IMonoBehaviourMethods;
249 #[cfg(feature = "unity_engine-object_2")]
250 pub use crate::unity_engine::object_2::IObject_2Methods;
251 #[cfg(feature = "unity_engine-ui-basemesheffect")]
252 pub use crate::unity_engine::ui::basemesheffect::IBaseMeshEffectMethods;
253 pub use crate::{
254 system::object::IObject,
255 unity_engine::{
256 behaviour::IBehaviour, component::IComponent, event_systems::uibehaviour::IUIBehaviour, monobehaviour::IMonoBehaviour,
257 object_2::IObject_2, ui::basemesheffect::IBaseMeshEffect,
258 },
259 };
260}