engage/generated/unity_engine/
physicmaterial.rs1#[cfg(feature = "unity_engine-physicmaterial-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::object_2::{IObject_2, Object_2},
11 };
12
13 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/physicmaterial/PhysicMaterial.md"))]
14 #[::unity::class(namespace = "UnityEngine", name = "PhysicMaterial")]
15 #[parent(crate::unity_engine::object_2::Object_2)]
16 pub struct PhysicMaterial {}
17}
18
19#[cfg(feature = "unity_engine-physicmaterial-types")]
20pub use __types::*;
21
22#[cfg(feature = "unity_engine-physicmaterial")]
23impl PhysicMaterial {
24 #[doc = "`Internal_CreateDynamicsMaterial(crate::unity_engine::physicmaterial::PhysicMaterial, ::unity::Il2CppString)` overload"]
25 pub fn internal_create_dynamics_material(
26 mat: impl ::core::convert::Into<crate::unity_engine::physicmaterial::PhysicMaterial>,
27 name: impl ::core::convert::Into<::unity::Il2CppString>,
28 ) -> () {
29 unsafe {
30 ::unity::il2cpp_call!((::unity::module_base()+0x3ef7a50usize)as*mut u8,();
31(crate::unity_engine::physicmaterial::PhysicMaterial)::core::convert::Into::into(mat),(::unity::Il2CppString)::core::convert::Into::into(name))
32 }
33 }
34}
35
36#[cfg(feature = "unity_engine-physicmaterial")]
37pub trait IPhysicMaterialMethods: IPhysicMaterial {
38 #[doc = "`.ctor()` overload"]
39 fn ctor(self) -> () {
40 unsafe {
41 let __receiver = <PhysicMaterial as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
42 ::unity::il2cpp_call!((::unity::module_base()+0x3ef79a0usize)as*mut u8,();
43(PhysicMaterial)__receiver)
44 }
45 }
46 #[doc = "`.ctor(::unity::Il2CppString)` overload"]
47 fn ctor_2(self, name: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
48 unsafe {
49 let __receiver = <PhysicMaterial as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
50 ::unity::il2cpp_call!((::unity::module_base()+0x3ef7aa0usize)as*mut u8,();
51(PhysicMaterial)__receiver,(::unity::Il2CppString)::core::convert::Into::into(name))
52 }
53 }
54 #[doc = "`get_bounciness()` overload"]
55 fn get_bounciness(self) -> f32 {
56 unsafe {
57 let __receiver = <PhysicMaterial as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
58 ::unity::il2cpp_call!((::unity::module_base()+0x3ef7b40usize)as*mut u8,f32;
59(PhysicMaterial)__receiver)
60 }
61 }
62 #[doc = "`set_bounciness(f32)` overload"]
63 fn set_bounciness(self, value: impl ::core::convert::Into<f32>) -> () {
64 unsafe {
65 let __receiver = <PhysicMaterial as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
66 ::unity::il2cpp_call!((::unity::module_base()+0x3ef7b90usize)as*mut u8,();
67(PhysicMaterial)__receiver,(f32)::core::convert::Into::into(value))
68 }
69 }
70 #[doc = "`get_dynamicFriction()` overload"]
71 fn get_dynamic_friction(self) -> f32 {
72 unsafe {
73 let __receiver = <PhysicMaterial as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
74 ::unity::il2cpp_call!((::unity::module_base()+0x3ef7be0usize)as*mut u8,f32;
75(PhysicMaterial)__receiver)
76 }
77 }
78 #[doc = "`set_dynamicFriction(f32)` overload"]
79 fn set_dynamic_friction(self, value: impl ::core::convert::Into<f32>) -> () {
80 unsafe {
81 let __receiver = <PhysicMaterial as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
82 ::unity::il2cpp_call!((::unity::module_base()+0x3ef7c30usize)as*mut u8,();
83(PhysicMaterial)__receiver,(f32)::core::convert::Into::into(value))
84 }
85 }
86 #[doc = "`get_staticFriction()` overload"]
87 fn get_static_friction(self) -> f32 {
88 unsafe {
89 let __receiver = <PhysicMaterial as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
90 ::unity::il2cpp_call!((::unity::module_base()+0x3ef7c80usize)as*mut u8,f32;
91(PhysicMaterial)__receiver)
92 }
93 }
94 #[doc = "`set_staticFriction(f32)` overload"]
95 fn set_static_friction(self, value: impl ::core::convert::Into<f32>) -> () {
96 unsafe {
97 let __receiver = <PhysicMaterial as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
98 ::unity::il2cpp_call!((::unity::module_base()+0x3ef7cd0usize)as*mut u8,();
99(PhysicMaterial)__receiver,(f32)::core::convert::Into::into(value))
100 }
101 }
102 #[doc = "`get_frictionCombine()` overload"]
103 fn get_friction_combine(self) -> crate::unity_engine::physicmaterialcombine::PhysicMaterialCombine {
104 unsafe {
105 let __receiver = <PhysicMaterial as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
106 ::unity::il2cpp_call!((::unity::module_base()+0x3ef7d20usize)as*mut u8,crate::unity_engine::physicmaterialcombine::PhysicMaterialCombine;
107(PhysicMaterial)__receiver)
108 }
109 }
110 #[doc = "`set_frictionCombine(crate::unity_engine::physicmaterialcombine::PhysicMaterialCombine)` overload"]
111 fn set_friction_combine(self, value: impl ::core::convert::Into<crate::unity_engine::physicmaterialcombine::PhysicMaterialCombine>) -> () {
112 unsafe {
113 let __receiver = <PhysicMaterial as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
114 ::unity::il2cpp_call!((::unity::module_base()+0x3ef7d70usize)as*mut u8,();
115(PhysicMaterial)__receiver,(crate::unity_engine::physicmaterialcombine::PhysicMaterialCombine)::core::convert::Into::into(value))
116 }
117 }
118 #[doc = "`get_bounceCombine()` overload"]
119 fn get_bounce_combine(self) -> crate::unity_engine::physicmaterialcombine::PhysicMaterialCombine {
120 unsafe {
121 let __receiver = <PhysicMaterial as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
122 ::unity::il2cpp_call!((::unity::module_base()+0x3ef7dc0usize)as*mut u8,crate::unity_engine::physicmaterialcombine::PhysicMaterialCombine;
123(PhysicMaterial)__receiver)
124 }
125 }
126 #[doc = "`set_bounceCombine(crate::unity_engine::physicmaterialcombine::PhysicMaterialCombine)` overload"]
127 fn set_bounce_combine(self, value: impl ::core::convert::Into<crate::unity_engine::physicmaterialcombine::PhysicMaterialCombine>) -> () {
128 unsafe {
129 let __receiver = <PhysicMaterial as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
130 ::unity::il2cpp_call!((::unity::module_base()+0x3ef7e10usize)as*mut u8,();
131(PhysicMaterial)__receiver,(crate::unity_engine::physicmaterialcombine::PhysicMaterialCombine)::core::convert::Into::into(value))
132 }
133 }
134 #[doc = "`get_bouncyness()` overload"]
135 fn get_bouncyness(self) -> f32 {
136 unsafe {
137 let __receiver = <PhysicMaterial as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
138 ::unity::il2cpp_call!((::unity::module_base()+0x3ef7e60usize)as*mut u8,f32;
139(PhysicMaterial)__receiver)
140 }
141 }
142 #[doc = "`set_bouncyness(f32)` overload"]
143 fn set_bouncyness(self, value: impl ::core::convert::Into<f32>) -> () {
144 unsafe {
145 let __receiver = <PhysicMaterial as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
146 ::unity::il2cpp_call!((::unity::module_base()+0x3ef7eb0usize)as*mut u8,();
147(PhysicMaterial)__receiver,(f32)::core::convert::Into::into(value))
148 }
149 }
150 #[doc = "`get_frictionDirection2()` overload"]
151 fn get_friction_direction2(self) -> crate::unity_engine::vector3::Vector3 {
152 unsafe {
153 let __receiver = <PhysicMaterial as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
154 ::unity::il2cpp_call!((::unity::module_base()+0x3ef7f00usize)as*mut u8,crate::unity_engine::vector3::Vector3;
155(PhysicMaterial)__receiver)
156 }
157 }
158 #[doc = "`set_frictionDirection2(crate::unity_engine::vector3::Vector3)` overload"]
159 fn set_friction_direction2(self, value: impl ::core::convert::Into<crate::unity_engine::vector3::Vector3>) -> () {
160 unsafe {
161 let __receiver = <PhysicMaterial as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
162 ::unity::il2cpp_call!((::unity::module_base()+0x3ef7f10usize)as*mut u8,();
163(PhysicMaterial)__receiver,(crate::unity_engine::vector3::Vector3)::core::convert::Into::into(value))
164 }
165 }
166 #[doc = "`get_dynamicFriction2()` overload"]
167 fn get_dynamic_friction2(self) -> f32 {
168 unsafe {
169 let __receiver = <PhysicMaterial as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
170 ::unity::il2cpp_call!((::unity::module_base()+0x3ef7f20usize)as*mut u8,f32;
171(PhysicMaterial)__receiver)
172 }
173 }
174 #[doc = "`set_dynamicFriction2(f32)` overload"]
175 fn set_dynamic_friction2(self, value: impl ::core::convert::Into<f32>) -> () {
176 unsafe {
177 let __receiver = <PhysicMaterial as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
178 ::unity::il2cpp_call!((::unity::module_base()+0x3ef7f30usize)as*mut u8,();
179(PhysicMaterial)__receiver,(f32)::core::convert::Into::into(value))
180 }
181 }
182 #[doc = "`get_staticFriction2()` overload"]
183 fn get_static_friction2(self) -> f32 {
184 unsafe {
185 let __receiver = <PhysicMaterial as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
186 ::unity::il2cpp_call!((::unity::module_base()+0x3ef7f40usize)as*mut u8,f32;
187(PhysicMaterial)__receiver)
188 }
189 }
190 #[doc = "`set_staticFriction2(f32)` overload"]
191 fn set_static_friction2(self, value: impl ::core::convert::Into<f32>) -> () {
192 unsafe {
193 let __receiver = <PhysicMaterial as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
194 ::unity::il2cpp_call!((::unity::module_base()+0x3ef7f50usize)as*mut u8,();
195(PhysicMaterial)__receiver,(f32)::core::convert::Into::into(value))
196 }
197 }
198 #[doc = "`get_frictionDirection()` overload"]
199 fn get_friction_direction(self) -> crate::unity_engine::vector3::Vector3 {
200 unsafe {
201 let __receiver = <PhysicMaterial as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
202 ::unity::il2cpp_call!((::unity::module_base()+0x3ef7f60usize)as*mut u8,crate::unity_engine::vector3::Vector3;
203(PhysicMaterial)__receiver)
204 }
205 }
206 #[doc = "`set_frictionDirection(crate::unity_engine::vector3::Vector3)` overload"]
207 fn set_friction_direction(self, value: impl ::core::convert::Into<crate::unity_engine::vector3::Vector3>) -> () {
208 unsafe {
209 let __receiver = <PhysicMaterial as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
210 ::unity::il2cpp_call!((::unity::module_base()+0x3ef7f70usize)as*mut u8,();
211(PhysicMaterial)__receiver,(crate::unity_engine::vector3::Vector3)::core::convert::Into::into(value))
212 }
213 }
214}
215
216#[cfg(feature = "unity_engine-physicmaterial")]
217impl<__T: IPhysicMaterial> IPhysicMaterialMethods for __T {}
218
219#[cfg(feature = "unity_engine-physicmaterial")]
220impl PhysicMaterial {
221 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
222 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
223 }
224
225 pub fn ctor_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
226 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
227 }
228
229 pub fn internal_create_dynamics_material_method_info() -> &'static ::unity::il2cpp::MethodInfo {
230 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
231 }
232
233 pub fn get_bounciness_method_info() -> &'static ::unity::il2cpp::MethodInfo {
234 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
235 }
236
237 pub fn set_bounciness_method_info() -> &'static ::unity::il2cpp::MethodInfo {
238 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
239 }
240
241 pub fn get_dynamic_friction_method_info() -> &'static ::unity::il2cpp::MethodInfo {
242 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
243 }
244
245 pub fn set_dynamic_friction_method_info() -> &'static ::unity::il2cpp::MethodInfo {
246 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
247 }
248
249 pub fn get_static_friction_method_info() -> &'static ::unity::il2cpp::MethodInfo {
250 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
251 }
252
253 pub fn set_static_friction_method_info() -> &'static ::unity::il2cpp::MethodInfo {
254 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
255 }
256
257 pub fn get_friction_combine_method_info() -> &'static ::unity::il2cpp::MethodInfo {
258 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
259 }
260
261 pub fn set_friction_combine_method_info() -> &'static ::unity::il2cpp::MethodInfo {
262 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
263 }
264
265 pub fn get_bounce_combine_method_info() -> &'static ::unity::il2cpp::MethodInfo {
266 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
267 }
268
269 pub fn set_bounce_combine_method_info() -> &'static ::unity::il2cpp::MethodInfo {
270 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
271 }
272
273 pub fn get_bouncyness_method_info() -> &'static ::unity::il2cpp::MethodInfo {
274 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
275 }
276
277 pub fn set_bouncyness_method_info() -> &'static ::unity::il2cpp::MethodInfo {
278 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
279 }
280
281 pub fn get_friction_direction2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
282 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
283 }
284
285 pub fn set_friction_direction2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
286 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[16]
287 }
288
289 pub fn get_dynamic_friction2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
290 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[17]
291 }
292
293 pub fn set_dynamic_friction2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
294 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[18]
295 }
296
297 pub fn get_static_friction2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
298 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[19]
299 }
300
301 pub fn set_static_friction2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
302 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[20]
303 }
304
305 pub fn get_friction_direction_method_info() -> &'static ::unity::il2cpp::MethodInfo {
306 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[21]
307 }
308
309 pub fn set_friction_direction_method_info() -> &'static ::unity::il2cpp::MethodInfo {
310 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[22]
311 }
312}
313
314#[cfg(feature = "unity_engine-physicmaterial")]
315impl PhysicMaterial {
316 #[doc = "`.ctor()` — no args"]
317 pub fn new() -> Self {
318 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
319 panic!(
320 "{}
321::{}
322 failed to instantiate",
323 ::core::stringify!(PhysicMaterial),
324 ::core::stringify!(new),
325 )
326 });
327 <Self as IPhysicMaterialMethods>::ctor(this);
328 this
329 }
330
331 #[doc = "`.ctor(::unity::Il2CppString)` — overload selector"]
332 pub fn new_2(name: ::unity::Il2CppString) -> Self {
333 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
334 panic!(
335 "{}
336::{}
337 failed to instantiate",
338 ::core::stringify!(PhysicMaterial),
339 ::core::stringify!(new_2),
340 )
341 });
342 <Self as IPhysicMaterialMethods>::ctor_2(this, name);
343 this
344 }
345}
346
347#[cfg(feature = "unity_engine-physicmaterial")]
348#[doc(hidden)]
349pub mod prelude {
350 pub use super::{IPhysicMaterial, IPhysicMaterialMethods, PhysicMaterial};
351 #[cfg(feature = "system-object")]
352 pub use crate::system::object::IObjectMethods;
353 #[cfg(feature = "unity_engine-object_2")]
354 pub use crate::unity_engine::object_2::IObject_2Methods;
355 pub use crate::{system::object::IObject, unity_engine::object_2::IObject_2};
356}