Skip to main content

engage/generated/unity_engine/resource_management/
iupdatereceiver.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-resource_management-iupdatereceiver-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/resource_management/iupdatereceiver/IUpdateReceiver.md"))]
10    #[::unity::class(namespace = "UnityEngine.ResourceManagement", name = "IUpdateReceiver")]
11    pub struct IUpdateReceiver {}
12}
13
14#[cfg(feature = "unity_engine-resource_management-iupdatereceiver-types")]
15pub use __types::*;
16
17#[cfg(feature = "unity_engine-resource_management-iupdatereceiver")]
18pub trait IIUpdateReceiverMethods: IIUpdateReceiver {
19    #[doc = "`Update(f32)` overload"]
20    fn update(self, unscaled_delta_time: impl ::core::convert::Into<f32>) -> () {
21        unsafe {
22            let __receiver = <IUpdateReceiver as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
23            {
24                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
25                let __vi = *__vt.get(0usize).unwrap_or_else(|| {
26                    panic!(
27                        "unity: virtual slot {}
28 out of range (vtable len {}
29) on the runtime class behind {}
30 (method `{}
31`)",
32                        0usize,
33                        __vt.len(),
34                        <IUpdateReceiver as ::unity::ClassIdentity>::NAME,
35                        "Update",
36                    )
37                });
38                let __inner: extern "C" fn(IUpdateReceiver, f32, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
39                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
40                __inner(__receiver, ::core::convert::Into::into(unscaled_delta_time), __mi)
41            }
42        }
43    }
44}
45
46#[cfg(feature = "unity_engine-resource_management-iupdatereceiver")]
47impl<__T: IIUpdateReceiver> IIUpdateReceiverMethods for __T {}
48
49#[cfg(feature = "unity_engine-resource_management-iupdatereceiver")]
50impl IUpdateReceiver {
51    pub fn update_method_info() -> &'static ::unity::il2cpp::MethodInfo {
52        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
53    }
54}
55
56#[cfg(feature = "unity_engine-resource_management-iupdatereceiver")]
57impl IUpdateReceiver {
58    #[doc = "Direct (non-virtual) call to `IUpdateReceiver`'s own `Update`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
59    pub unsafe fn update(this: impl ::core::convert::Into<::unity::IlInstance>, unscaled_delta_time: f32) -> () {
60        let __mi = Self::update_method_info();
61        let __inner: extern "C" fn(::unity::IlInstance, f32, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
62        __inner(this.into(), unscaled_delta_time, ::core::option::Option::None)
63    }
64}
65
66#[cfg(feature = "unity_engine-resource_management-iupdatereceiver")]
67#[doc(hidden)]
68pub mod prelude {
69    pub use super::{IIUpdateReceiver, IIUpdateReceiverMethods, IUpdateReceiver};
70}