Skip to main content

engage/generated/unity_engine/
playerprefs.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-playerprefs-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/playerprefs/PlayerPrefs.md"))]
11    #[::unity::class(namespace = "UnityEngine", name = "PlayerPrefs")]
12    #[parent(crate::system::object::Object)]
13    pub struct PlayerPrefs {}
14}
15
16#[cfg(feature = "unity_engine-playerprefs-types")]
17pub use __types::*;
18
19#[cfg(feature = "unity_engine-playerprefs")]
20impl PlayerPrefs {
21    #[doc = "`GetInt(::unity::Il2CppString, i32)` overload"]
22    pub fn get_int(key: impl ::core::convert::Into<::unity::Il2CppString>, default_value: impl ::core::convert::Into<i32>) -> i32 {
23        unsafe {
24            ::unity::il2cpp_call!((::unity::module_base()+0x32f8910usize)as*mut u8,i32;
25(::unity::Il2CppString)::core::convert::Into::into(key),(i32)::core::convert::Into::into(default_value))
26        }
27    }
28
29    #[doc = "`GetInt(::unity::Il2CppString)` overload"]
30    pub fn get_int_2(key: impl ::core::convert::Into<::unity::Il2CppString>) -> i32 {
31        unsafe {
32            ::unity::il2cpp_call!((::unity::module_base()+0x32f8960usize)as*mut u8,i32;
33(::unity::Il2CppString)::core::convert::Into::into(key))
34        }
35    }
36
37    #[doc = "`GetString(::unity::Il2CppString, ::unity::Il2CppString)` overload"]
38    pub fn get_string(
39        key: impl ::core::convert::Into<::unity::Il2CppString>,
40        default_value: impl ::core::convert::Into<::unity::Il2CppString>,
41    ) -> ::unity::Il2CppString {
42        unsafe {
43            ::unity::il2cpp_call!((::unity::module_base()+0x32f89b0usize)as*mut u8, ::unity::Il2CppString;
44(::unity::Il2CppString)::core::convert::Into::into(key),(::unity::Il2CppString)::core::convert::Into::into(default_value))
45        }
46    }
47
48    #[doc = "`GetString(::unity::Il2CppString)` overload"]
49    pub fn get_string_2(key: impl ::core::convert::Into<::unity::Il2CppString>) -> ::unity::Il2CppString {
50        unsafe {
51            ::unity::il2cpp_call!((::unity::module_base()+0x32f8a00usize)as*mut u8, ::unity::Il2CppString;
52(::unity::Il2CppString)::core::convert::Into::into(key))
53        }
54    }
55}
56
57#[cfg(feature = "unity_engine-playerprefs")]
58impl PlayerPrefs {
59    pub fn get_int_method_info() -> &'static ::unity::il2cpp::MethodInfo {
60        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
61    }
62
63    pub fn get_int_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
64        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
65    }
66
67    pub fn get_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
68        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
69    }
70
71    pub fn get_string_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
72        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
73    }
74}
75
76#[cfg(feature = "unity_engine-playerprefs")]
77#[doc(hidden)]
78pub mod prelude {
79    pub use super::{IPlayerPrefs, PlayerPrefs};
80    pub use crate::system::object::IObject;
81    #[cfg(feature = "system-object")]
82    pub use crate::system::object::IObjectMethods;
83}