engage/generated/unity_engine/
joint.rs1#[cfg(feature = "unity_engine-joint-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 component::{Component, IComponent},
12 object_2::{IObject_2, Object_2},
13 },
14 };
15
16 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/joint/Joint.md"))]
17 #[::unity::class(namespace = "UnityEngine", name = "Joint")]
18 #[parent(crate::unity_engine::component::Component)]
19 pub struct Joint {}
20}
21
22#[cfg(feature = "unity_engine-joint-types")]
23pub use __types::*;
24
25#[cfg(feature = "unity_engine-joint")]
26pub trait IJointMethods: IJoint {
27 #[doc = "`get_connectedBody()` overload"]
28 fn get_connected_body(self) -> crate::unity_engine::rigidbody::Rigidbody {
29 unsafe {
30 let __receiver = <Joint as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
31 ::unity::il2cpp_call!((::unity::module_base()+0x3ef7650usize)as*mut u8,crate::unity_engine::rigidbody::Rigidbody;
32(Joint)__receiver)
33 }
34 }
35 #[doc = "`set_connectedAnchor(crate::unity_engine::vector3::Vector3)` overload"]
36 fn set_connected_anchor(self, value: impl ::core::convert::Into<crate::unity_engine::vector3::Vector3>) -> () {
37 unsafe {
38 let __receiver = <Joint as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
39 ::unity::il2cpp_call!((::unity::module_base()+0x3ef76a0usize)as*mut u8,();
40(Joint)__receiver,(crate::unity_engine::vector3::Vector3)::core::convert::Into::into(value))
41 }
42 }
43 #[doc = "`.ctor()` overload"]
44 fn ctor(self) -> () {
45 unsafe {
46 let __receiver = <Joint as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
47 ::unity::il2cpp_call!((::unity::module_base()+0x3ef7630usize)as*mut u8,();
48(Joint)__receiver)
49 }
50 }
51 #[doc = "`set_connectedAnchor_Injected(*mutcrate::unity_engine::vector3::Vector3)` overload"]
52 fn set_connected_anchor_injected(self) -> crate::unity_engine::vector3::Vector3 {
53 unsafe {
54 let __receiver = <Joint as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
55 let mut __out_0 = ::core::mem::MaybeUninit::<crate::unity_engine::vector3::Vector3>::uninit();
56 ::unity::il2cpp_call!((::unity::module_base()+0x3ef7700usize)as*mut u8,();
57(Joint)__receiver,(*mut crate::unity_engine::vector3::Vector3)__out_0.as_mut_ptr());
58 __out_0.assume_init()
59 }
60 }
61}
62
63#[cfg(feature = "unity_engine-joint")]
64impl<__T: IJoint> IJointMethods for __T {}
65
66#[cfg(feature = "unity_engine-joint")]
67impl Joint {
68 pub fn get_connected_body_method_info() -> &'static ::unity::il2cpp::MethodInfo {
69 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
70 }
71
72 pub fn set_connected_anchor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
73 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
74 }
75
76 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
77 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
78 }
79
80 pub fn set_connected_anchor_injected_method_info() -> &'static ::unity::il2cpp::MethodInfo {
81 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
82 }
83}
84
85#[cfg(feature = "unity_engine-joint")]
86impl Joint {
87 #[doc = "`.ctor()` — no args"]
88 pub fn new() -> Self {
89 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
90 panic!(
91 "{}
92::{}
93 failed to instantiate",
94 ::core::stringify!(Joint),
95 ::core::stringify!(new),
96 )
97 });
98 <Self as IJointMethods>::ctor(this);
99 this
100 }
101}
102
103#[cfg(feature = "unity_engine-joint")]
104#[doc(hidden)]
105pub mod prelude {
106 pub use super::{IJoint, IJointMethods, Joint};
107 #[cfg(feature = "system-object")]
108 pub use crate::system::object::IObjectMethods;
109 #[cfg(feature = "unity_engine-component")]
110 pub use crate::unity_engine::component::IComponentMethods;
111 #[cfg(feature = "unity_engine-object_2")]
112 pub use crate::unity_engine::object_2::IObject_2Methods;
113 pub use crate::{
114 system::object::IObject,
115 unity_engine::{component::IComponent, object_2::IObject_2},
116 };
117}