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