engage/generated/unity_engine/event_systems/
physics2draycaster.rs1#[cfg(feature = "unity_engine-event_systems-physics2draycaster-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 behaviour::{Behaviour, IBehaviour},
12 component::{Component, IComponent},
13 event_systems::{
14 baseraycaster::{BaseRaycaster, IBaseRaycaster},
15 physicsraycaster::{IPhysicsRaycaster, PhysicsRaycaster},
16 uibehaviour::{IUIBehaviour, UIBehaviour},
17 },
18 monobehaviour::{IMonoBehaviour, MonoBehaviour},
19 object_2::{IObject_2, Object_2},
20 },
21 };
22
23 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/event_systems/physics2draycaster/Physics2DRaycaster.md"))]
24 #[::unity::class(namespace = "UnityEngine.EventSystems", name = "Physics2DRaycaster")]
25 #[parent(crate::unity_engine::event_systems::physicsraycaster::PhysicsRaycaster)]
26 pub struct Physics2DRaycaster {
27 #[offset(64)]
28 #[rename(name = "m_Hits")]
29 pub m_hits: ::unity::Array<crate::unity_engine::raycasthit2d::RaycastHit2D>,
30 }
31}
32
33#[cfg(feature = "unity_engine-event_systems-physics2draycaster-types")]
34pub use __types::*;
35
36#[cfg(feature = "unity_engine-event_systems-physics2draycaster")]
37pub trait IPhysics2DRaycasterMethods: IPhysics2DRaycaster {
38 #[doc = "`.ctor()` overload"]
39 fn ctor(self) -> () {
40 unsafe {
41 let __receiver = <Physics2DRaycaster as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
42 ::unity::il2cpp_call!((::unity::module_base()+0x371df30usize)as*mut u8,();
43(Physics2DRaycaster)__receiver)
44 }
45 }
46 #[doc = "`Raycast(crate::unity_engine::event_systems::pointereventdata::PointerEventData, crate::system::collections::generic::list_1::List_1<crate::unity_engine::event_systems::raycastresult::RaycastResult>)` overload"]
47 fn raycast(
48 self,
49 event_data: impl ::core::convert::Into<crate::unity_engine::event_systems::pointereventdata::PointerEventData>,
50 result_append_list: impl ::core::convert::Into<
51 crate::system::collections::generic::list_1::List_1<crate::unity_engine::event_systems::raycastresult::RaycastResult>,
52 >,
53 ) -> () {
54 unsafe {
55 let __receiver = <Physics2DRaycaster as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
56 {
57 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
58 let __vi = *__vt.get(17usize).unwrap_or_else(|| {
59 panic!(
60 "unity: virtual slot {}
61 out of range (vtable len {}
62) on the runtime class behind {}
63 (method `{}
64`)",
65 17usize,
66 __vt.len(),
67 <Physics2DRaycaster as ::unity::ClassIdentity>::NAME,
68 "Raycast",
69 )
70 });
71 let __inner: extern "C" fn(
72 Physics2DRaycaster,
73 crate::unity_engine::event_systems::pointereventdata::PointerEventData,
74 crate::system::collections::generic::list_1::List_1<crate::unity_engine::event_systems::raycastresult::RaycastResult>,
75 ::unity::OptionalMethod,
76 ) -> () = ::core::mem::transmute(__vi.method_ptr);
77 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
78 __inner(
79 __receiver,
80 ::core::convert::Into::into(event_data),
81 ::core::convert::Into::into(result_append_list),
82 __mi,
83 )
84 }
85 }
86 }
87}
88
89#[cfg(feature = "unity_engine-event_systems-physics2draycaster")]
90impl<__T: IPhysics2DRaycaster> IPhysics2DRaycasterMethods for __T {}
91
92#[cfg(feature = "unity_engine-event_systems-physics2draycaster")]
93impl Physics2DRaycaster {
94 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
95 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
96 }
97
98 pub fn raycast_method_info() -> &'static ::unity::il2cpp::MethodInfo {
99 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
100 }
101}
102
103#[cfg(feature = "unity_engine-event_systems-physics2draycaster")]
104impl Physics2DRaycaster {
105 #[doc = "Direct (non-virtual) call to `Physics2DRaycaster`'s own `Raycast`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
106 pub unsafe fn raycast(
107 this: impl ::core::convert::Into<::unity::IlInstance>,
108 event_data: crate::unity_engine::event_systems::pointereventdata::PointerEventData,
109 result_append_list: crate::system::collections::generic::list_1::List_1<crate::unity_engine::event_systems::raycastresult::RaycastResult>,
110 ) -> () {
111 let __mi = Self::raycast_method_info();
112 let __inner: extern "C" fn(
113 ::unity::IlInstance,
114 crate::unity_engine::event_systems::pointereventdata::PointerEventData,
115 crate::system::collections::generic::list_1::List_1<crate::unity_engine::event_systems::raycastresult::RaycastResult>,
116 ::unity::OptionalMethod,
117 ) -> () = ::core::mem::transmute(__mi.method_ptr);
118 __inner(this.into(), event_data, result_append_list, ::core::option::Option::None)
119 }
120}
121
122#[cfg(feature = "unity_engine-event_systems-physics2draycaster")]
123impl Physics2DRaycaster {
124 #[doc = "`.ctor()` — no args"]
125 pub fn new() -> Self {
126 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
127 panic!(
128 "{}
129::{}
130 failed to instantiate",
131 ::core::stringify!(Physics2DRaycaster),
132 ::core::stringify!(new),
133 )
134 });
135 <Self as IPhysics2DRaycasterMethods>::ctor(this);
136 this
137 }
138}
139
140#[cfg(feature = "unity_engine-event_systems-physics2draycaster")]
141#[doc(hidden)]
142pub mod prelude {
143 pub use super::{IPhysics2DRaycaster, IPhysics2DRaycasterMethods, Physics2DRaycaster};
144 #[cfg(feature = "system-object")]
145 pub use crate::system::object::IObjectMethods;
146 #[cfg(feature = "unity_engine-behaviour")]
147 pub use crate::unity_engine::behaviour::IBehaviourMethods;
148 #[cfg(feature = "unity_engine-component")]
149 pub use crate::unity_engine::component::IComponentMethods;
150 #[cfg(feature = "unity_engine-event_systems-baseraycaster")]
151 pub use crate::unity_engine::event_systems::baseraycaster::IBaseRaycasterMethods;
152 #[cfg(feature = "unity_engine-event_systems-physicsraycaster")]
153 pub use crate::unity_engine::event_systems::physicsraycaster::IPhysicsRaycasterMethods;
154 #[cfg(feature = "unity_engine-event_systems-uibehaviour")]
155 pub use crate::unity_engine::event_systems::uibehaviour::IUIBehaviourMethods;
156 #[cfg(feature = "unity_engine-monobehaviour")]
157 pub use crate::unity_engine::monobehaviour::IMonoBehaviourMethods;
158 #[cfg(feature = "unity_engine-object_2")]
159 pub use crate::unity_engine::object_2::IObject_2Methods;
160 pub use crate::{
161 system::object::IObject,
162 unity_engine::{
163 behaviour::IBehaviour,
164 component::IComponent,
165 event_systems::{baseraycaster::IBaseRaycaster, physicsraycaster::IPhysicsRaycaster, uibehaviour::IUIBehaviour},
166 monobehaviour::IMonoBehaviour,
167 object_2::IObject_2,
168 },
169 };
170}