engage/generated/root_motion/
genericbaker.rs1#[cfg(feature = "root_motion-genericbaker-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::{
9 root_motion::baker::{Baker, IBaker},
10 system::object::{IObject, Object},
11 unity_engine::{
12 behaviour::{Behaviour, IBehaviour},
13 component::{Component, IComponent},
14 monobehaviour::{IMonoBehaviour, MonoBehaviour},
15 object_2::{IObject_2, Object_2},
16 },
17 };
18
19 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/root_motion/genericbaker/GenericBaker.md"))]
20 #[::unity::class(namespace = "RootMotion", name = "GenericBaker")]
21 #[parent(crate::root_motion::baker::Baker)]
22 pub struct GenericBaker {
23 #[offset(116)]
24 #[rename(name = "markAsLegacy")]
25 pub mark_as_legacy: bool,
26 #[offset(120)]
27 #[rename(name = "root")]
28 pub root: crate::unity_engine::transform::Transform,
29 #[offset(128)]
30 #[rename(name = "rootNode")]
31 pub root_node: crate::unity_engine::transform::Transform,
32 #[offset(136)]
33 #[rename(name = "ignoreList")]
34 pub ignore_list: ::unity::Array<crate::unity_engine::transform::Transform>,
35 #[offset(144)]
36 #[rename(name = "bakePositionList")]
37 pub bake_position_list: ::unity::Array<crate::unity_engine::transform::Transform>,
38 #[offset(152)]
39 #[rename(name = "children")]
40 pub children: ::unity::Array<crate::root_motion::bakertransform::BakerTransform>,
41 #[offset(160)]
42 #[rename(name = "rootChild")]
43 pub root_child: crate::root_motion::bakertransform::BakerTransform,
44 #[offset(168)]
45 #[rename(name = "rootChildIndex")]
46 pub root_child_index: i32,
47 }
48}
49
50#[cfg(feature = "root_motion-genericbaker-types")]
51pub use __types::*;
52
53#[cfg(feature = "root_motion-genericbaker")]
54pub trait IGenericBakerMethods: IGenericBaker {
55 #[doc = "`Awake()` overload"]
56 fn awake(self) -> () {
57 unsafe {
58 let __receiver = <GenericBaker as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
59 ::unity::il2cpp_call!((::unity::module_base()+0x2520ce0usize)as*mut u8,();
60(GenericBaker)__receiver)
61 }
62 }
63 #[doc = "`GetCharacterRoot()` overload"]
64 fn get_character_root(self) -> crate::unity_engine::transform::Transform {
65 unsafe {
66 let __receiver = <GenericBaker as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
67 {
68 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
69 let __vi = *__vt.get(4usize).unwrap_or_else(|| {
70 panic!(
71 "unity: virtual slot {}
72 out of range (vtable len {}
73) on the runtime class behind {}
74 (method `{}
75`)",
76 4usize,
77 __vt.len(),
78 <GenericBaker as ::unity::ClassIdentity>::NAME,
79 "GetCharacterRoot",
80 )
81 });
82 let __inner: extern "C" fn(GenericBaker, ::unity::OptionalMethod) -> crate::unity_engine::transform::Transform =
83 ::core::mem::transmute(__vi.method_ptr);
84 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
85 __inner(__receiver, __mi)
86 }
87 }
88 }
89 #[doc = "`OnStartBaking()` overload"]
90 fn on_start_baking(self) -> () {
91 unsafe {
92 let __receiver = <GenericBaker as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
93 {
94 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
95 let __vi = *__vt.get(5usize).unwrap_or_else(|| {
96 panic!(
97 "unity: virtual slot {}
98 out of range (vtable len {}
99) on the runtime class behind {}
100 (method `{}
101`)",
102 5usize,
103 __vt.len(),
104 <GenericBaker as ::unity::ClassIdentity>::NAME,
105 "OnStartBaking",
106 )
107 });
108 let __inner: extern "C" fn(GenericBaker, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
109 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
110 __inner(__receiver, __mi)
111 }
112 }
113 }
114 #[doc = "`OnSetLoopFrame(f32)` overload"]
115 fn on_set_loop_frame(self, time: impl ::core::convert::Into<f32>) -> () {
116 unsafe {
117 let __receiver = <GenericBaker as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
118 {
119 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
120 let __vi = *__vt.get(6usize).unwrap_or_else(|| {
121 panic!(
122 "unity: virtual slot {}
123 out of range (vtable len {}
124) on the runtime class behind {}
125 (method `{}
126`)",
127 6usize,
128 __vt.len(),
129 <GenericBaker as ::unity::ClassIdentity>::NAME,
130 "OnSetLoopFrame",
131 )
132 });
133 let __inner: extern "C" fn(GenericBaker, f32, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
134 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
135 __inner(__receiver, ::core::convert::Into::into(time), __mi)
136 }
137 }
138 }
139 #[doc = "`OnSetCurves(*mutcrate::unity_engine::animationclip::AnimationClip)` overload"]
140 fn on_set_curves(self) -> crate::unity_engine::animationclip::AnimationClip {
141 unsafe {
142 let __receiver = <GenericBaker as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
143 let mut __out_0 = ::core::mem::MaybeUninit::<crate::unity_engine::animationclip::AnimationClip>::uninit();
144 {
145 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
146 let __vi = *__vt.get(7usize).unwrap_or_else(|| {
147 panic!(
148 "unity: virtual slot {}
149 out of range (vtable len {}
150) on the runtime class behind {}
151 (method `{}
152`)",
153 7usize,
154 __vt.len(),
155 <GenericBaker as ::unity::ClassIdentity>::NAME,
156 "OnSetCurves",
157 )
158 });
159 let __inner: extern "C" fn(GenericBaker, *mut crate::unity_engine::animationclip::AnimationClip, ::unity::OptionalMethod) -> () =
160 ::core::mem::transmute(__vi.method_ptr);
161 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
162 __inner(__receiver, __out_0.as_mut_ptr(), __mi)
163 };
164 __out_0.assume_init()
165 }
166 }
167 #[doc = "`OnSetKeyframes(f32, bool)` overload"]
168 fn on_set_keyframes(self, time: impl ::core::convert::Into<f32>, last_frame: impl ::core::convert::Into<bool>) -> () {
169 unsafe {
170 let __receiver = <GenericBaker as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
171 {
172 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
173 let __vi = *__vt.get(8usize).unwrap_or_else(|| {
174 panic!(
175 "unity: virtual slot {}
176 out of range (vtable len {}
177) on the runtime class behind {}
178 (method `{}
179`)",
180 8usize,
181 __vt.len(),
182 <GenericBaker as ::unity::ClassIdentity>::NAME,
183 "OnSetKeyframes",
184 )
185 });
186 let __inner: extern "C" fn(GenericBaker, f32, bool, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
187 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
188 __inner(
189 __receiver,
190 ::core::convert::Into::into(time),
191 ::core::convert::Into::into(last_frame),
192 __mi,
193 )
194 }
195 }
196 }
197 #[doc = "`IsIgnored(crate::unity_engine::transform::Transform)` overload"]
198 fn is_ignored(self, t: impl ::core::convert::Into<crate::unity_engine::transform::Transform>) -> bool {
199 unsafe {
200 let __receiver = <GenericBaker as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
201 ::unity::il2cpp_call!((::unity::module_base()+0x2520f30usize)as*mut u8,bool;
202(GenericBaker)__receiver,(crate::unity_engine::transform::Transform)::core::convert::Into::into(t))
203 }
204 }
205 #[doc = "`BakePosition(crate::unity_engine::transform::Transform)` overload"]
206 fn bake_position(self, t: impl ::core::convert::Into<crate::unity_engine::transform::Transform>) -> bool {
207 unsafe {
208 let __receiver = <GenericBaker as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
209 ::unity::il2cpp_call!((::unity::module_base()+0x2521010usize)as*mut u8,bool;
210(GenericBaker)__receiver,(crate::unity_engine::transform::Transform)::core::convert::Into::into(t))
211 }
212 }
213 #[doc = "`.ctor()` overload"]
214 fn ctor(self) -> () {
215 unsafe {
216 let __receiver = <GenericBaker as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
217 ::unity::il2cpp_call!((::unity::module_base()+0x2521390usize)as*mut u8,();
218(GenericBaker)__receiver)
219 }
220 }
221}
222
223#[cfg(feature = "root_motion-genericbaker")]
224impl<__T: IGenericBaker> IGenericBakerMethods for __T {}
225
226#[cfg(feature = "root_motion-genericbaker")]
227impl GenericBaker {
228 pub fn awake_method_info() -> &'static ::unity::il2cpp::MethodInfo {
229 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
230 }
231
232 pub fn get_character_root_method_info() -> &'static ::unity::il2cpp::MethodInfo {
233 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
234 }
235
236 pub fn on_start_baking_method_info() -> &'static ::unity::il2cpp::MethodInfo {
237 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
238 }
239
240 pub fn on_set_loop_frame_method_info() -> &'static ::unity::il2cpp::MethodInfo {
241 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
242 }
243
244 pub fn on_set_curves_method_info() -> &'static ::unity::il2cpp::MethodInfo {
245 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
246 }
247
248 pub fn on_set_keyframes_method_info() -> &'static ::unity::il2cpp::MethodInfo {
249 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
250 }
251
252 pub fn is_ignored_method_info() -> &'static ::unity::il2cpp::MethodInfo {
253 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
254 }
255
256 pub fn bake_position_method_info() -> &'static ::unity::il2cpp::MethodInfo {
257 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
258 }
259
260 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
261 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
262 }
263}
264
265#[cfg(feature = "root_motion-genericbaker")]
266impl GenericBaker {
267 #[doc = "Direct (non-virtual) call to `GenericBaker`'s own `GetCharacterRoot`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
268 pub unsafe fn get_character_root(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::unity_engine::transform::Transform {
269 let __mi = Self::get_character_root_method_info();
270 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::unity_engine::transform::Transform =
271 ::core::mem::transmute(__mi.method_ptr);
272 __inner(this.into(), ::core::option::Option::None)
273 }
274
275 #[doc = "Direct (non-virtual) call to `GenericBaker`'s own `OnStartBaking`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
276 pub unsafe fn on_start_baking(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
277 let __mi = Self::on_start_baking_method_info();
278 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
279 __inner(this.into(), ::core::option::Option::None)
280 }
281
282 #[doc = "Direct (non-virtual) call to `GenericBaker`'s own `OnSetLoopFrame`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
283 pub unsafe fn on_set_loop_frame(this: impl ::core::convert::Into<::unity::IlInstance>, time: f32) -> () {
284 let __mi = Self::on_set_loop_frame_method_info();
285 let __inner: extern "C" fn(::unity::IlInstance, f32, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
286 __inner(this.into(), time, ::core::option::Option::None)
287 }
288
289 #[doc = "Direct (non-virtual) call to `GenericBaker`'s own `OnSetCurves`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
290 pub unsafe fn on_set_curves(
291 this: impl ::core::convert::Into<::unity::IlInstance>,
292 clip: *mut crate::unity_engine::animationclip::AnimationClip,
293 ) -> () {
294 let __mi = Self::on_set_curves_method_info();
295 let __inner: extern "C" fn(::unity::IlInstance, *mut crate::unity_engine::animationclip::AnimationClip, ::unity::OptionalMethod) -> () =
296 ::core::mem::transmute(__mi.method_ptr);
297 __inner(this.into(), clip, ::core::option::Option::None)
298 }
299
300 #[doc = "Direct (non-virtual) call to `GenericBaker`'s own `OnSetKeyframes`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
301 pub unsafe fn on_set_keyframes(this: impl ::core::convert::Into<::unity::IlInstance>, time: f32, last_frame: bool) -> () {
302 let __mi = Self::on_set_keyframes_method_info();
303 let __inner: extern "C" fn(::unity::IlInstance, f32, bool, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
304 __inner(this.into(), time, last_frame, ::core::option::Option::None)
305 }
306}
307
308#[cfg(feature = "root_motion-genericbaker")]
309impl GenericBaker {
310 #[doc = "`.ctor()` — no args"]
311 pub fn new() -> Self {
312 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
313 panic!(
314 "{}
315::{}
316 failed to instantiate",
317 ::core::stringify!(GenericBaker),
318 ::core::stringify!(new),
319 )
320 });
321 <Self as IGenericBakerMethods>::ctor(this);
322 this
323 }
324}
325
326#[cfg(feature = "root_motion-genericbaker")]
327#[doc(hidden)]
328pub mod prelude {
329 pub use super::{GenericBaker, IGenericBaker, IGenericBakerMethods};
330 #[cfg(feature = "root_motion-baker")]
331 pub use crate::root_motion::baker::IBakerMethods;
332 #[cfg(feature = "system-object")]
333 pub use crate::system::object::IObjectMethods;
334 #[cfg(feature = "unity_engine-behaviour")]
335 pub use crate::unity_engine::behaviour::IBehaviourMethods;
336 #[cfg(feature = "unity_engine-component")]
337 pub use crate::unity_engine::component::IComponentMethods;
338 #[cfg(feature = "unity_engine-monobehaviour")]
339 pub use crate::unity_engine::monobehaviour::IMonoBehaviourMethods;
340 #[cfg(feature = "unity_engine-object_2")]
341 pub use crate::unity_engine::object_2::IObject_2Methods;
342 pub use crate::{
343 root_motion::baker::IBaker,
344 system::object::IObject,
345 unity_engine::{behaviour::IBehaviour, component::IComponent, monobehaviour::IMonoBehaviour, object_2::IObject_2},
346 };
347}