engage/generated/unity_engine/
random.rs1#[cfg(feature = "unity_engine-random-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::object::{IObject, Object};
9
10 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/random/Random.md"))]
11 #[::unity::class(namespace = "UnityEngine", name = "Random")]
12 #[parent(crate::system::object::Object)]
13 pub struct Random {}
14}
15
16#[cfg(feature = "unity_engine-random-types")]
17pub use __types::*;
18
19#[cfg(feature = "unity_engine-random")]
20impl Random {
21 #[doc = "`InitState(i32)` overload"]
22 pub fn init_state(seed: impl ::core::convert::Into<i32>) -> () {
23 unsafe {
24 ::unity::il2cpp_call!((::unity::module_base()+0x2f79c00usize)as*mut u8,();
25(i32)::core::convert::Into::into(seed))
26 }
27 }
28
29 #[doc = "`Range(f32, f32)` overload"]
30 pub fn range(min_inclusive: impl ::core::convert::Into<f32>, max_inclusive: impl ::core::convert::Into<f32>) -> f32 {
31 unsafe {
32 ::unity::il2cpp_call!((::unity::module_base()+0x2f79c50usize)as*mut u8,f32;
33(f32)::core::convert::Into::into(min_inclusive),(f32)::core::convert::Into::into(max_inclusive))
34 }
35 }
36
37 #[doc = "`Range(i32, i32)` overload"]
38 pub fn range_2(min_inclusive: impl ::core::convert::Into<i32>, max_exclusive: impl ::core::convert::Into<i32>) -> i32 {
39 unsafe {
40 ::unity::il2cpp_call!((::unity::module_base()+0x2f79ca0usize)as*mut u8,i32;
41(i32)::core::convert::Into::into(min_inclusive),(i32)::core::convert::Into::into(max_exclusive))
42 }
43 }
44
45 #[doc = "`RandomRangeInt(i32, i32)` overload"]
46 pub fn random_range_int(min_inclusive: impl ::core::convert::Into<i32>, max_exclusive: impl ::core::convert::Into<i32>) -> i32 {
47 unsafe {
48 ::unity::il2cpp_call!((::unity::module_base()+0x2f79cf0usize)as*mut u8,i32;
49(i32)::core::convert::Into::into(min_inclusive),(i32)::core::convert::Into::into(max_exclusive))
50 }
51 }
52
53 #[doc = "`get_value()` overload"]
54 pub fn get_value() -> f32 {
55 unsafe {
56 ::unity::il2cpp_call!((::unity::module_base()+0x2f79d40usize)as*mut u8,f32;
57 )
58 }
59 }
60
61 #[doc = "`get_insideUnitSphere()` overload"]
62 pub fn get_inside_unit_sphere() -> crate::unity_engine::vector3::Vector3 {
63 unsafe {
64 ::unity::il2cpp_call!((::unity::module_base()+0x2f79d80usize)as*mut u8,crate::unity_engine::vector3::Vector3;
65 )
66 }
67 }
68
69 #[doc = "`get_insideUnitSphere_Injected(*mutcrate::unity_engine::vector3::Vector3)` overload"]
70 pub fn get_inside_unit_sphere_injected() -> crate::unity_engine::vector3::Vector3 {
71 unsafe {
72 let mut __out_0 = ::core::mem::MaybeUninit::<crate::unity_engine::vector3::Vector3>::uninit();
73 ::unity::il2cpp_call!((::unity::module_base()+0x2f79de0usize)as*mut u8,();
74(*mut crate::unity_engine::vector3::Vector3)__out_0.as_mut_ptr());
75 __out_0.assume_init()
76 }
77 }
78}
79
80#[cfg(feature = "unity_engine-random")]
81impl Random {
82 pub fn init_state_method_info() -> &'static ::unity::il2cpp::MethodInfo {
83 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
84 }
85
86 pub fn range_method_info() -> &'static ::unity::il2cpp::MethodInfo {
87 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
88 }
89
90 pub fn range_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
91 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
92 }
93
94 pub fn random_range_int_method_info() -> &'static ::unity::il2cpp::MethodInfo {
95 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
96 }
97
98 pub fn get_value_method_info() -> &'static ::unity::il2cpp::MethodInfo {
99 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
100 }
101
102 pub fn get_inside_unit_sphere_method_info() -> &'static ::unity::il2cpp::MethodInfo {
103 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
104 }
105
106 pub fn get_inside_unit_sphere_injected_method_info() -> &'static ::unity::il2cpp::MethodInfo {
107 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
108 }
109}
110
111#[cfg(feature = "unity_engine-random")]
112#[doc(hidden)]
113pub mod prelude {
114 pub use super::{IRandom, Random};
115 pub use crate::system::object::IObject;
116 #[cfg(feature = "system-object")]
117 pub use crate::system::object::IObjectMethods;
118}