engage/generated/unity_engine/
gradient.rs1#[cfg(feature = "unity_engine-gradient-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/gradient/Gradient.md"))]
11 #[::unity::class(namespace = "UnityEngine", name = "Gradient")]
12 #[parent(crate::system::object::Object)]
13 pub struct Gradient {
14 #[offset(16)]
15 #[rename(name = "m_Ptr")]
16 pub m_ptr: ::unity::IntPtr,
17 }
18}
19
20#[cfg(feature = "unity_engine-gradient-types")]
21pub use __types::*;
22
23#[cfg(feature = "unity_engine-gradient")]
24impl Gradient {
25 #[doc = "`Init()` overload"]
26 pub fn init() -> ::unity::IntPtr {
27 unsafe {
28 ::unity::il2cpp_call!((::unity::module_base()+0x2c4fc70usize)as*mut u8, ::unity::IntPtr;
29 )
30 }
31 }
32}
33
34#[cfg(feature = "unity_engine-gradient")]
35pub trait IGradientMethods: IGradient {
36 #[doc = "`Cleanup()` overload"]
37 fn cleanup(self) -> () {
38 unsafe {
39 let __receiver = <Gradient as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
40 ::unity::il2cpp_call!((::unity::module_base()+0x2c4fcb0usize)as*mut u8,();
41(Gradient)__receiver)
42 }
43 }
44 #[doc = "`Internal_Equals(::unity::IntPtr)` overload"]
45 fn internal_equals(self, other: impl ::core::convert::Into<::unity::IntPtr>) -> bool {
46 unsafe {
47 let __receiver = <Gradient as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
48 ::unity::il2cpp_call!((::unity::module_base()+0x2c4fd00usize)as*mut u8,bool;
49(Gradient)__receiver,(::unity::IntPtr)::core::convert::Into::into(other))
50 }
51 }
52 #[doc = "`.ctor()` overload"]
53 fn ctor(self) -> () {
54 unsafe {
55 let __receiver = <Gradient as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
56 ::unity::il2cpp_call!((::unity::module_base()+0x2c4fd50usize)as*mut u8,();
57(Gradient)__receiver)
58 }
59 }
60 #[doc = "`Finalize()` overload"]
61 fn finalize(self) -> () {
62 unsafe {
63 let __receiver = <Gradient as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
64 {
65 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
66 let __vi = *__vt.get(1usize).unwrap_or_else(|| {
67 panic!(
68 "unity: virtual slot {}
69 out of range (vtable len {}
70) on the runtime class behind {}
71 (method `{}
72`)",
73 1usize,
74 __vt.len(),
75 <Gradient as ::unity::ClassIdentity>::NAME,
76 "Finalize",
77 )
78 });
79 let __inner: extern "C" fn(Gradient, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
80 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
81 __inner(__receiver, __mi)
82 }
83 }
84 }
85 #[doc = "`Equals(crate::system::object::Object)` overload"]
86 fn equals(self, o: impl ::core::convert::Into<crate::system::object::Object>) -> bool {
87 unsafe {
88 let __receiver = <Gradient as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
89 {
90 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
91 let __vi = *__vt.get(0usize).unwrap_or_else(|| {
92 panic!(
93 "unity: virtual slot {}
94 out of range (vtable len {}
95) on the runtime class behind {}
96 (method `{}
97`)",
98 0usize,
99 __vt.len(),
100 <Gradient as ::unity::ClassIdentity>::NAME,
101 "Equals",
102 )
103 });
104 let __inner: extern "C" fn(Gradient, crate::system::object::Object, ::unity::OptionalMethod) -> bool =
105 ::core::mem::transmute(__vi.method_ptr);
106 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
107 __inner(__receiver, ::core::convert::Into::into(o), __mi)
108 }
109 }
110 }
111 #[doc = "`Equals(crate::unity_engine::gradient::Gradient)` overload"]
112 fn equals_2(self, other: impl ::core::convert::Into<crate::unity_engine::gradient::Gradient>) -> bool {
113 unsafe {
114 let __receiver = <Gradient as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
115 {
116 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
117 let __vi = *__vt.get(4usize).unwrap_or_else(|| {
118 panic!(
119 "unity: virtual slot {}
120 out of range (vtable len {}
121) on the runtime class behind {}
122 (method `{}
123`)",
124 4usize,
125 __vt.len(),
126 <Gradient as ::unity::ClassIdentity>::NAME,
127 "Equals",
128 )
129 });
130 let __inner: extern "C" fn(Gradient, crate::unity_engine::gradient::Gradient, ::unity::OptionalMethod) -> bool =
131 ::core::mem::transmute(__vi.method_ptr);
132 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
133 __inner(__receiver, ::core::convert::Into::into(other), __mi)
134 }
135 }
136 }
137 #[doc = "`GetHashCode()` overload"]
138 fn get_hash_code(self) -> i32 {
139 unsafe {
140 let __receiver = <Gradient as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
141 {
142 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
143 let __vi = *__vt.get(2usize).unwrap_or_else(|| {
144 panic!(
145 "unity: virtual slot {}
146 out of range (vtable len {}
147) on the runtime class behind {}
148 (method `{}
149`)",
150 2usize,
151 __vt.len(),
152 <Gradient as ::unity::ClassIdentity>::NAME,
153 "GetHashCode",
154 )
155 });
156 let __inner: extern "C" fn(Gradient, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
157 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
158 __inner(__receiver, __mi)
159 }
160 }
161 }
162}
163
164#[cfg(feature = "unity_engine-gradient")]
165impl<__T: IGradient> IGradientMethods for __T {}
166
167#[cfg(feature = "unity_engine-gradient")]
168impl Gradient {
169 pub fn init_method_info() -> &'static ::unity::il2cpp::MethodInfo {
170 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
171 }
172
173 pub fn cleanup_method_info() -> &'static ::unity::il2cpp::MethodInfo {
174 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
175 }
176
177 pub fn internal_equals_method_info() -> &'static ::unity::il2cpp::MethodInfo {
178 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
179 }
180
181 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
182 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
183 }
184
185 pub fn finalize_method_info() -> &'static ::unity::il2cpp::MethodInfo {
186 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
187 }
188
189 pub fn equals_method_info() -> &'static ::unity::il2cpp::MethodInfo {
190 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
191 }
192
193 pub fn equals_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
194 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
195 }
196
197 pub fn get_hash_code_method_info() -> &'static ::unity::il2cpp::MethodInfo {
198 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
199 }
200}
201
202#[cfg(feature = "unity_engine-gradient")]
203impl Gradient {
204 #[doc = "Direct (non-virtual) call to `Gradient`'s own `Finalize`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
205 pub unsafe fn finalize(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
206 let __mi = Self::finalize_method_info();
207 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
208 __inner(this.into(), ::core::option::Option::None)
209 }
210
211 #[doc = "Direct (non-virtual) call to `Gradient`'s own `Equals`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
212 pub unsafe fn equals(this: impl ::core::convert::Into<::unity::IlInstance>, o: crate::system::object::Object) -> bool {
213 let __mi = Self::equals_method_info();
214 let __inner: extern "C" fn(::unity::IlInstance, crate::system::object::Object, ::unity::OptionalMethod) -> bool =
215 ::core::mem::transmute(__mi.method_ptr);
216 __inner(this.into(), o, ::core::option::Option::None)
217 }
218
219 #[doc = "Direct (non-virtual) call to `Gradient`'s own `Equals`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
220 pub unsafe fn equals_2(this: impl ::core::convert::Into<::unity::IlInstance>, other: crate::unity_engine::gradient::Gradient) -> bool {
221 let __mi = Self::equals_2_method_info();
222 let __inner: extern "C" fn(::unity::IlInstance, crate::unity_engine::gradient::Gradient, ::unity::OptionalMethod) -> bool =
223 ::core::mem::transmute(__mi.method_ptr);
224 __inner(this.into(), other, ::core::option::Option::None)
225 }
226
227 #[doc = "Direct (non-virtual) call to `Gradient`'s own `GetHashCode`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
228 pub unsafe fn get_hash_code(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
229 let __mi = Self::get_hash_code_method_info();
230 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
231 __inner(this.into(), ::core::option::Option::None)
232 }
233}
234
235#[cfg(feature = "unity_engine-gradient")]
236impl Gradient {
237 #[doc = "`.ctor()` — no args"]
238 pub fn new() -> Self {
239 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
240 panic!(
241 "{}
242::{}
243 failed to instantiate",
244 ::core::stringify!(Gradient),
245 ::core::stringify!(new),
246 )
247 });
248 <Self as IGradientMethods>::ctor(this);
249 this
250 }
251}
252
253#[cfg(feature = "unity_engine-gradient")]
254#[doc(hidden)]
255pub mod prelude {
256 pub use super::{Gradient, IGradient, IGradientMethods};
257 pub use crate::system::object::IObject;
258 #[cfg(feature = "system-object")]
259 pub use crate::system::object::IObjectMethods;
260}