engage/generated/unity_engine/
animationevent.rs1#[cfg(feature = "unity_engine-animationevent-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/animationevent/AnimationEvent.md"))]
11 #[::unity::class(namespace = "UnityEngine", name = "AnimationEvent")]
12 #[parent(crate::system::object::Object)]
13 pub struct AnimationEvent {
14 #[offset(16)]
15 #[rename(name = "m_Time")]
16 pub m_time: f32,
17 #[offset(24)]
18 #[rename(name = "m_FunctionName")]
19 pub m_function_name: ::unity::Il2CppString,
20 #[offset(32)]
21 #[rename(name = "m_StringParameter")]
22 pub m_string_parameter: ::unity::Il2CppString,
23 #[offset(40)]
24 #[rename(name = "m_ObjectReferenceParameter")]
25 pub m_object_reference_parameter: crate::unity_engine::object_2::Object_2,
26 #[offset(48)]
27 #[rename(name = "m_FloatParameter")]
28 pub m_float_parameter: f32,
29 #[offset(52)]
30 #[rename(name = "m_IntParameter")]
31 pub m_int_parameter: i32,
32 #[offset(56)]
33 #[rename(name = "m_MessageOptions")]
34 pub m_message_options: i32,
35 #[offset(60)]
36 #[rename(name = "m_Source")]
37 pub m_source: crate::unity_engine::animationeventsource::AnimationEventSource,
38 #[offset(64)]
39 #[rename(name = "m_StateSender")]
40 pub m_state_sender: crate::unity_engine::animationstate::AnimationState,
41 #[offset(72)]
42 #[rename(name = "m_AnimatorStateInfo")]
43 pub m_animator_state_info: crate::unity_engine::animatorstateinfo::AnimatorStateInfo,
44 #[offset(108)]
45 #[rename(name = "m_AnimatorClipInfo")]
46 pub m_animator_clip_info: crate::unity_engine::animatorclipinfo::AnimatorClipInfo,
47 }
48}
49
50#[cfg(feature = "unity_engine-animationevent-types")]
51pub use __types::*;
52
53#[cfg(feature = "unity_engine-animationevent")]
54pub trait IAnimationEventMethods: IAnimationEvent {
55 #[doc = "`.ctor()` overload"]
56 fn ctor(self) -> () {
57 unsafe {
58 let __receiver = <AnimationEvent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
59 ::unity::il2cpp_call!((::unity::module_base()+0x3ead620usize)as*mut u8,();
60(AnimationEvent)__receiver)
61 }
62 }
63 #[doc = "`get_stringParameter()` overload"]
64 fn get_string_parameter(self) -> ::unity::Il2CppString {
65 unsafe {
66 let __receiver = <AnimationEvent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
67 ::unity::il2cpp_call!((::unity::module_base()+0x3ead6c0usize)as*mut u8, ::unity::Il2CppString;
68(AnimationEvent)__receiver)
69 }
70 }
71 #[doc = "`set_stringParameter(::unity::Il2CppString)` overload"]
72 fn set_string_parameter(self, value: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
73 unsafe {
74 let __receiver = <AnimationEvent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
75 ::unity::il2cpp_call!((::unity::module_base()+0x3ead6d0usize)as*mut u8,();
76(AnimationEvent)__receiver,(::unity::Il2CppString)::core::convert::Into::into(value))
77 }
78 }
79 #[doc = "`get_floatParameter()` overload"]
80 fn get_float_parameter(self) -> f32 {
81 unsafe {
82 let __receiver = <AnimationEvent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
83 ::unity::il2cpp_call!((::unity::module_base()+0x3ead6e0usize)as*mut u8,f32;
84(AnimationEvent)__receiver)
85 }
86 }
87 #[doc = "`set_floatParameter(f32)` overload"]
88 fn set_float_parameter(self, value: impl ::core::convert::Into<f32>) -> () {
89 unsafe {
90 let __receiver = <AnimationEvent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
91 ::unity::il2cpp_call!((::unity::module_base()+0x3ead6f0usize)as*mut u8,();
92(AnimationEvent)__receiver,(f32)::core::convert::Into::into(value))
93 }
94 }
95 #[doc = "`get_intParameter()` overload"]
96 fn get_int_parameter(self) -> i32 {
97 unsafe {
98 let __receiver = <AnimationEvent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
99 ::unity::il2cpp_call!((::unity::module_base()+0x3ead700usize)as*mut u8,i32;
100(AnimationEvent)__receiver)
101 }
102 }
103 #[doc = "`set_intParameter(i32)` overload"]
104 fn set_int_parameter(self, value: impl ::core::convert::Into<i32>) -> () {
105 unsafe {
106 let __receiver = <AnimationEvent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
107 ::unity::il2cpp_call!((::unity::module_base()+0x3ead710usize)as*mut u8,();
108(AnimationEvent)__receiver,(i32)::core::convert::Into::into(value))
109 }
110 }
111 #[doc = "`get_objectReferenceParameter()` overload"]
112 fn get_object_reference_parameter(self) -> crate::unity_engine::object_2::Object_2 {
113 unsafe {
114 let __receiver = <AnimationEvent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
115 ::unity::il2cpp_call!((::unity::module_base()+0x3ead720usize)as*mut u8,crate::unity_engine::object_2::Object_2;
116(AnimationEvent)__receiver)
117 }
118 }
119 #[doc = "`set_objectReferenceParameter(crate::unity_engine::object_2::Object_2)` overload"]
120 fn set_object_reference_parameter(self, value: impl ::core::convert::Into<crate::unity_engine::object_2::Object_2>) -> () {
121 unsafe {
122 let __receiver = <AnimationEvent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
123 ::unity::il2cpp_call!((::unity::module_base()+0x3ead730usize)as*mut u8,();
124(AnimationEvent)__receiver,(crate::unity_engine::object_2::Object_2)::core::convert::Into::into(value))
125 }
126 }
127 #[doc = "`get_functionName()` overload"]
128 fn get_function_name(self) -> ::unity::Il2CppString {
129 unsafe {
130 let __receiver = <AnimationEvent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
131 ::unity::il2cpp_call!((::unity::module_base()+0x3ead740usize)as*mut u8, ::unity::Il2CppString;
132(AnimationEvent)__receiver)
133 }
134 }
135 #[doc = "`set_functionName(::unity::Il2CppString)` overload"]
136 fn set_function_name(self, value: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
137 unsafe {
138 let __receiver = <AnimationEvent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
139 ::unity::il2cpp_call!((::unity::module_base()+0x3ead750usize)as*mut u8,();
140(AnimationEvent)__receiver,(::unity::Il2CppString)::core::convert::Into::into(value))
141 }
142 }
143 #[doc = "`get_time()` overload"]
144 fn get_time(self) -> f32 {
145 unsafe {
146 let __receiver = <AnimationEvent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
147 ::unity::il2cpp_call!((::unity::module_base()+0x3ead760usize)as*mut u8,f32;
148(AnimationEvent)__receiver)
149 }
150 }
151 #[doc = "`set_time(f32)` overload"]
152 fn set_time(self, value: impl ::core::convert::Into<f32>) -> () {
153 unsafe {
154 let __receiver = <AnimationEvent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
155 ::unity::il2cpp_call!((::unity::module_base()+0x3ead770usize)as*mut u8,();
156(AnimationEvent)__receiver,(f32)::core::convert::Into::into(value))
157 }
158 }
159 #[doc = "`get_messageOptions()` overload"]
160 fn get_message_options(self) -> crate::unity_engine::sendmessageoptions::SendMessageOptions {
161 unsafe {
162 let __receiver = <AnimationEvent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
163 ::unity::il2cpp_call!((::unity::module_base()+0x3ead780usize)as*mut u8,crate::unity_engine::sendmessageoptions::SendMessageOptions;
164(AnimationEvent)__receiver)
165 }
166 }
167 #[doc = "`set_messageOptions(crate::unity_engine::sendmessageoptions::SendMessageOptions)` overload"]
168 fn set_message_options(self, value: impl ::core::convert::Into<crate::unity_engine::sendmessageoptions::SendMessageOptions>) -> () {
169 unsafe {
170 let __receiver = <AnimationEvent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
171 ::unity::il2cpp_call!((::unity::module_base()+0x3ead790usize)as*mut u8,();
172(AnimationEvent)__receiver,(crate::unity_engine::sendmessageoptions::SendMessageOptions)::core::convert::Into::into(value))
173 }
174 }
175}
176
177#[cfg(feature = "unity_engine-animationevent")]
178impl<__T: IAnimationEvent> IAnimationEventMethods for __T {}
179
180#[cfg(feature = "unity_engine-animationevent")]
181impl AnimationEvent {
182 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
183 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
184 }
185
186 pub fn get_string_parameter_method_info() -> &'static ::unity::il2cpp::MethodInfo {
187 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
188 }
189
190 pub fn set_string_parameter_method_info() -> &'static ::unity::il2cpp::MethodInfo {
191 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
192 }
193
194 pub fn get_float_parameter_method_info() -> &'static ::unity::il2cpp::MethodInfo {
195 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
196 }
197
198 pub fn set_float_parameter_method_info() -> &'static ::unity::il2cpp::MethodInfo {
199 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
200 }
201
202 pub fn get_int_parameter_method_info() -> &'static ::unity::il2cpp::MethodInfo {
203 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
204 }
205
206 pub fn set_int_parameter_method_info() -> &'static ::unity::il2cpp::MethodInfo {
207 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
208 }
209
210 pub fn get_object_reference_parameter_method_info() -> &'static ::unity::il2cpp::MethodInfo {
211 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
212 }
213
214 pub fn set_object_reference_parameter_method_info() -> &'static ::unity::il2cpp::MethodInfo {
215 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
216 }
217
218 pub fn get_function_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
219 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
220 }
221
222 pub fn set_function_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
223 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
224 }
225
226 pub fn get_time_method_info() -> &'static ::unity::il2cpp::MethodInfo {
227 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
228 }
229
230 pub fn set_time_method_info() -> &'static ::unity::il2cpp::MethodInfo {
231 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
232 }
233
234 pub fn get_message_options_method_info() -> &'static ::unity::il2cpp::MethodInfo {
235 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
236 }
237
238 pub fn set_message_options_method_info() -> &'static ::unity::il2cpp::MethodInfo {
239 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
240 }
241}
242
243#[cfg(feature = "unity_engine-animationevent")]
244impl AnimationEvent {
245 #[doc = "`.ctor()` — no args"]
246 pub fn new() -> Self {
247 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
248 panic!(
249 "{}
250::{}
251 failed to instantiate",
252 ::core::stringify!(AnimationEvent),
253 ::core::stringify!(new),
254 )
255 });
256 <Self as IAnimationEventMethods>::ctor(this);
257 this
258 }
259}
260
261#[cfg(feature = "unity_engine-animationevent")]
262#[doc(hidden)]
263pub mod prelude {
264 pub use super::{AnimationEvent, IAnimationEvent, IAnimationEventMethods};
265 pub use crate::system::object::IObject;
266 #[cfg(feature = "system-object")]
267 pub use crate::system::object::IObjectMethods;
268}