Skip to main content

engage/generated/unity_engine/playables/
inotificationreceiver.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-playables-inotificationreceiver-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8
9    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/playables/inotificationreceiver/INotificationReceiver.md"))]
10    #[::unity::class(namespace = "UnityEngine.Playables", name = "INotificationReceiver")]
11    pub struct INotificationReceiver {}
12}
13
14#[cfg(feature = "unity_engine-playables-inotificationreceiver-types")]
15pub use __types::*;
16
17#[cfg(feature = "unity_engine-playables-inotificationreceiver")]
18pub trait IINotificationReceiverMethods: IINotificationReceiver {
19    #[doc = "`OnNotify(crate::unity_engine::playables::playable::Playable, crate::unity_engine::playables::inotification::INotification, crate::system::object::Object)` overload"]
20    fn on_notify(
21        self,
22        origin: impl ::core::convert::Into<crate::unity_engine::playables::playable::Playable>,
23        notification: impl ::core::convert::Into<crate::unity_engine::playables::inotification::INotification>,
24        context: impl ::core::convert::Into<crate::system::object::Object>,
25    ) -> () {
26        unsafe {
27            let __receiver = <INotificationReceiver as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
28            {
29                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
30                let __vi = *__vt.get(0usize).unwrap_or_else(|| {
31                    panic!(
32                        "unity: virtual slot {}
33 out of range (vtable len {}
34) on the runtime class behind {}
35 (method `{}
36`)",
37                        0usize,
38                        __vt.len(),
39                        <INotificationReceiver as ::unity::ClassIdentity>::NAME,
40                        "OnNotify",
41                    )
42                });
43                let __inner: extern "C" fn(
44                    INotificationReceiver,
45                    crate::unity_engine::playables::playable::Playable,
46                    crate::unity_engine::playables::inotification::INotification,
47                    crate::system::object::Object,
48                    ::unity::OptionalMethod,
49                ) -> () = ::core::mem::transmute(__vi.method_ptr);
50                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
51                __inner(
52                    __receiver,
53                    ::core::convert::Into::into(origin),
54                    ::core::convert::Into::into(notification),
55                    ::core::convert::Into::into(context),
56                    __mi,
57                )
58            }
59        }
60    }
61}
62
63#[cfg(feature = "unity_engine-playables-inotificationreceiver")]
64impl<__T: IINotificationReceiver> IINotificationReceiverMethods for __T {}
65
66#[cfg(feature = "unity_engine-playables-inotificationreceiver")]
67impl INotificationReceiver {
68    pub fn on_notify_method_info() -> &'static ::unity::il2cpp::MethodInfo {
69        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
70    }
71}
72
73#[cfg(feature = "unity_engine-playables-inotificationreceiver")]
74impl INotificationReceiver {
75    #[doc = "Direct (non-virtual) call to `INotificationReceiver`'s own `OnNotify`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
76    pub unsafe fn on_notify(
77        this: impl ::core::convert::Into<::unity::IlInstance>,
78        origin: crate::unity_engine::playables::playable::Playable,
79        notification: crate::unity_engine::playables::inotification::INotification,
80        context: crate::system::object::Object,
81    ) -> () {
82        let __mi = Self::on_notify_method_info();
83        let __inner: extern "C" fn(
84            ::unity::IlInstance,
85            crate::unity_engine::playables::playable::Playable,
86            crate::unity_engine::playables::inotification::INotification,
87            crate::system::object::Object,
88            ::unity::OptionalMethod,
89        ) -> () = ::core::mem::transmute(__mi.method_ptr);
90        __inner(this.into(), origin, notification, context, ::core::option::Option::None)
91    }
92}
93
94#[cfg(feature = "unity_engine-playables-inotificationreceiver")]
95#[doc(hidden)]
96pub mod prelude {
97    pub use super::{IINotificationReceiver, IINotificationReceiverMethods, INotificationReceiver};
98}