engage/generated/unity_engine/addressable_assets/utility/
serializationutilities.rs1#[cfg(feature = "unity_engine-addressable_assets-utility-serializationutilities-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::{
9 object::{IObject, Object},
10 r#enum::{Enum, IEnum},
11 valuetype::{IValueType, ValueType},
12 };
13
14 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/addressable_assets/utility/serializationutilities/SerializationUtilities_ObjectType.md"))]
15 #[repr(C)]
16 #[derive(::core::clone::Clone, ::core::marker::Copy, ::core::fmt::Debug, ::core::cmp::PartialEq, ::core::cmp::Eq)]
17 pub struct SerializationUtilities_ObjectType {
18 pub value: i32,
19 }
20 impl ::unity::ClassIdentity for SerializationUtilities_ObjectType {
21 const NAME: &'static str = "SerializationUtilities.ObjectType";
22 const NAMESPACE: &'static str = "UnityEngine.AddressableAssets.Utility";
23
24 fn class() -> ::unity::Class {
25 static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
26 *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
27 }
28 }
29 impl ::unity::IlType for SerializationUtilities_ObjectType {
30 fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
31 &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
32 }
33 }
34 impl SerializationUtilities_ObjectType {
35 pub fn ascii_string() -> Self {
36 Self { value: 0 }
37 }
38
39 pub fn unicode_string() -> Self {
40 Self { value: 1 }
41 }
42
43 pub fn u_int16() -> Self {
44 Self { value: 2 }
45 }
46
47 pub fn u_int32() -> Self {
48 Self { value: 3 }
49 }
50
51 pub fn int32() -> Self {
52 Self { value: 4 }
53 }
54
55 pub fn hash128() -> Self {
56 Self { value: 5 }
57 }
58
59 pub fn r#type() -> Self {
60 Self { value: 6 }
61 }
62
63 pub fn json_object() -> Self {
64 Self { value: 7 }
65 }
66 }
67
68 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/addressable_assets/utility/serializationutilities/SerializationUtilities.md"))]
69 #[::unity::class(namespace = "UnityEngine.AddressableAssets.Utility", name = "SerializationUtilities")]
70 #[parent(crate::system::object::Object)]
71 pub struct SerializationUtilities {}
72}
73
74#[cfg(feature = "unity_engine-addressable_assets-utility-serializationutilities-types")]
75pub use __types::*;
76
77#[cfg(feature = "unity_engine-addressable_assets-utility-serializationutilities")]
78impl SerializationUtilities {
79 #[doc = "`ReadInt32FromByteArray(::unity::Array<u8>, i32)` overload"]
80 pub fn read_int32_from_byte_array(data: impl ::core::convert::Into<::unity::Array<u8>>, offset: impl ::core::convert::Into<i32>) -> i32 {
81 unsafe {
82 ::unity::il2cpp_call!((::unity::module_base()+0x2db4990usize)as*mut u8,i32;
83(::unity::Array<u8>)::core::convert::Into::into(data),(i32)::core::convert::Into::into(offset))
84 }
85 }
86
87 #[doc = "`WriteInt32ToByteArray(::unity::Array<u8>, i32, i32)` overload"]
88 pub fn write_int32_to_byte_array(
89 data: impl ::core::convert::Into<::unity::Array<u8>>,
90 val: impl ::core::convert::Into<i32>,
91 offset: impl ::core::convert::Into<i32>,
92 ) -> i32 {
93 unsafe {
94 ::unity::il2cpp_call!((::unity::module_base()+0x2dbd3c0usize)as*mut u8,i32;
95(::unity::Array<u8>)::core::convert::Into::into(data),(i32)::core::convert::Into::into(val),(i32)::core::convert::Into::into(offset))
96 }
97 }
98
99 #[doc = "`ReadObjectFromByteArray(::unity::Array<u8>, i32)` overload"]
100 pub fn read_object_from_byte_array(
101 key_data: impl ::core::convert::Into<::unity::Array<u8>>,
102 data_index: impl ::core::convert::Into<i32>,
103 ) -> crate::system::object::Object {
104 unsafe {
105 ::unity::il2cpp_call!((::unity::module_base()+0x2db4a10usize)as*mut u8,crate::system::object::Object;
106(::unity::Array<u8>)::core::convert::Into::into(key_data),(i32)::core::convert::Into::into(data_index))
107 }
108 }
109
110 #[doc = "`WriteObjectToByteList(crate::system::object::Object, crate::system::collections::generic::list_1::List_1<u8>)` overload"]
111 pub fn write_object_to_byte_list(
112 obj: impl ::core::convert::Into<crate::system::object::Object>,
113 buffer: impl ::core::convert::Into<crate::system::collections::generic::list_1::List_1<u8>>,
114 ) -> i32 {
115 unsafe {
116 ::unity::il2cpp_call!((::unity::module_base()+0x2dbbeb0usize)as*mut u8,i32;
117(crate::system::object::Object)::core::convert::Into::into(obj),(crate::system::collections::generic::list_1::List_1<u8>)::core::convert::Into::into(buffer))
118 }
119 }
120}
121
122#[cfg(feature = "unity_engine-addressable_assets-utility-serializationutilities")]
123impl SerializationUtilities {
124 pub fn read_int32_from_byte_array_method_info() -> &'static ::unity::il2cpp::MethodInfo {
125 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
126 }
127
128 pub fn write_int32_to_byte_array_method_info() -> &'static ::unity::il2cpp::MethodInfo {
129 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
130 }
131
132 pub fn read_object_from_byte_array_method_info() -> &'static ::unity::il2cpp::MethodInfo {
133 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
134 }
135
136 pub fn write_object_to_byte_list_method_info() -> &'static ::unity::il2cpp::MethodInfo {
137 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
138 }
139}
140
141#[cfg(feature = "unity_engine-addressable_assets-utility-serializationutilities")]
142#[doc(hidden)]
143pub mod prelude {
144 pub use super::{ISerializationUtilities, SerializationUtilities, SerializationUtilities_ObjectType};
145 #[cfg(feature = "system-object")]
146 pub use crate::system::object::IObjectMethods;
147 #[cfg(feature = "system-enum")]
148 pub use crate::system::r#enum::IEnumMethods;
149 #[cfg(feature = "system-valuetype")]
150 pub use crate::system::valuetype::IValueTypeMethods;
151 pub use crate::system::{object::IObject, r#enum::IEnum, valuetype::IValueType};
152}