Skip to main content

engage/generated/unity_engine/switch/
operation.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-switch-operation-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/switch/operation/Operation_OperationMode.md"))]
15    #[repr(C)]
16    #[derive(::core::clone::Clone, ::core::marker::Copy, ::core::fmt::Debug, ::core::cmp::PartialEq, ::core::cmp::Eq)]
17    pub struct Operation_OperationMode {
18        pub value: i32,
19    }
20    impl ::unity::ClassIdentity for Operation_OperationMode {
21        const NAME: &'static str = "Operation.OperationMode";
22        const NAMESPACE: &'static str = "UnityEngine.Switch";
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 Operation_OperationMode {
30        fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
31            &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
32        }
33    }
34    impl Operation_OperationMode {
35        pub fn handheld() -> Self {
36            Self { value: 0 }
37        }
38
39        pub fn console() -> Self {
40            Self { value: 1 }
41        }
42    }
43
44    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/switch/operation/Operation.md"))]
45    #[::unity::class(namespace = "UnityEngine.Switch", name = "Operation")]
46    #[parent(crate::system::object::Object)]
47    pub struct Operation {}
48}
49
50#[cfg(feature = "unity_engine-switch-operation-types")]
51pub use __types::*;
52
53#[cfg(feature = "unity_engine-switch-operation")]
54impl Operation {
55    #[doc = "`get_mode()` overload"]
56    pub fn get_mode() -> crate::unity_engine::switch::operation::Operation_OperationMode {
57        unsafe {
58            ::unity::il2cpp_call!((::unity::module_base()+0x3f41840usize)as*mut u8,crate::unity_engine::switch::operation::Operation_OperationMode;
59            )
60        }
61    }
62
63    #[doc = "`GetMode_Internal()` overload"]
64    pub fn get_mode_internal() -> crate::unity_engine::switch::operation::Operation_OperationMode {
65        unsafe {
66            ::unity::il2cpp_call!((::unity::module_base()+0x3f41880usize)as*mut u8,crate::unity_engine::switch::operation::Operation_OperationMode;
67            )
68        }
69    }
70}
71
72#[cfg(feature = "unity_engine-switch-operation")]
73impl Operation {
74    pub fn get_mode_method_info() -> &'static ::unity::il2cpp::MethodInfo {
75        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
76    }
77
78    pub fn get_mode_internal_method_info() -> &'static ::unity::il2cpp::MethodInfo {
79        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
80    }
81}
82
83#[cfg(feature = "unity_engine-switch-operation")]
84#[doc(hidden)]
85pub mod prelude {
86    pub use super::{IOperation, Operation, Operation_OperationMode};
87    #[cfg(feature = "system-object")]
88    pub use crate::system::object::IObjectMethods;
89    #[cfg(feature = "system-enum")]
90    pub use crate::system::r#enum::IEnumMethods;
91    #[cfg(feature = "system-valuetype")]
92    pub use crate::system::valuetype::IValueTypeMethods;
93    pub use crate::system::{object::IObject, r#enum::IEnum, valuetype::IValueType};
94}