engage/generated/unity_engine/
raycasthit2d.rs1#[cfg(feature = "unity_engine-raycasthit2d-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::{
9 object::{IObject, Object},
10 valuetype::{IValueType, ValueType},
11 };
12
13 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/raycasthit2d/RaycastHit2D.md"))]
14 #[repr(C)]
15 #[derive(::core::clone::Clone, ::core::marker::Copy)]
16 pub struct RaycastHit2D {
17 pub m_centroid: crate::unity_engine::vector2::Vector2,
18 pub m_point: crate::unity_engine::vector2::Vector2,
19 pub m_normal: crate::unity_engine::vector2::Vector2,
20 pub m_distance: f32,
21 pub m_fraction: f32,
22 pub m_collider: i32,
23 }
24 impl ::unity::ClassIdentity for RaycastHit2D {
25 const NAME: &'static str = "RaycastHit2D";
26 const NAMESPACE: &'static str = "UnityEngine";
27
28 fn class() -> ::unity::Class {
29 static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
30 *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
31 }
32 }
33 impl ::unity::IlType for RaycastHit2D {
34 fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
35 &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
36 }
37 }
38}
39
40#[cfg(feature = "unity_engine-raycasthit2d-types")]
41pub use __types::*;
42
43#[cfg(feature = "unity_engine-raycasthit2d")]
44impl RaycastHit2D {
45 #[doc = "`get_point()` overload"]
46 pub fn get_point(&mut self) -> crate::unity_engine::vector2::Vector2 {
47 unsafe {
48 ::unity::il2cpp_call!((::unity::module_base()+0x3f33f90usize)as*mut u8,crate::unity_engine::vector2::Vector2;
49(*mut RaycastHit2D)self as*mut RaycastHit2D)
50 }
51 }
52
53 #[doc = "`get_normal()` overload"]
54 pub fn get_normal(&mut self) -> crate::unity_engine::vector2::Vector2 {
55 unsafe {
56 ::unity::il2cpp_call!((::unity::module_base()+0x3f33fa0usize)as*mut u8,crate::unity_engine::vector2::Vector2;
57(*mut RaycastHit2D)self as*mut RaycastHit2D)
58 }
59 }
60
61 #[doc = "`get_distance()` overload"]
62 pub fn get_distance(&mut self) -> f32 {
63 unsafe {
64 ::unity::il2cpp_call!((::unity::module_base()+0x3f33fb0usize)as*mut u8,f32;
65(*mut RaycastHit2D)self as*mut RaycastHit2D)
66 }
67 }
68
69 #[doc = "`get_collider()` overload"]
70 pub fn get_collider(&mut self) -> crate::unity_engine::collider2d::Collider2D {
71 unsafe {
72 ::unity::il2cpp_call!((::unity::module_base()+0x3f33fc0usize)as*mut u8,crate::unity_engine::collider2d::Collider2D;
73(*mut RaycastHit2D)self as*mut RaycastHit2D)
74 }
75 }
76}
77
78#[cfg(feature = "unity_engine-raycasthit2d")]
79impl RaycastHit2D {
80 pub fn get_point_method_info() -> &'static ::unity::il2cpp::MethodInfo {
81 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
82 }
83
84 pub fn get_normal_method_info() -> &'static ::unity::il2cpp::MethodInfo {
85 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
86 }
87
88 pub fn get_distance_method_info() -> &'static ::unity::il2cpp::MethodInfo {
89 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
90 }
91
92 pub fn get_collider_method_info() -> &'static ::unity::il2cpp::MethodInfo {
93 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
94 }
95}
96
97#[cfg(feature = "unity_engine-raycasthit2d")]
98#[doc(hidden)]
99pub mod prelude {
100 pub use super::RaycastHit2D;
101 #[cfg(feature = "system-object")]
102 pub use crate::system::object::IObjectMethods;
103 #[cfg(feature = "system-valuetype")]
104 pub use crate::system::valuetype::IValueTypeMethods;
105 pub use crate::system::{object::IObject, valuetype::IValueType};
106}