Skip to main content

engage/generated/unity_engine/
tooltipattribute.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-tooltipattribute-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::propertyattribute::{IPropertyAttribute, PropertyAttribute},
11    };
12
13    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/tooltipattribute/TooltipAttribute.md"))]
14    #[::unity::class(namespace = "UnityEngine", name = "TooltipAttribute")]
15    #[parent(crate::unity_engine::propertyattribute::PropertyAttribute)]
16    pub struct TooltipAttribute {
17        #[offset(16)]
18        #[rename(name = "tooltip")]
19        pub tooltip: ::unity::Il2CppString,
20    }
21}
22
23#[cfg(feature = "unity_engine-tooltipattribute-types")]
24pub use __types::*;
25
26#[cfg(feature = "unity_engine-tooltipattribute")]
27pub trait ITooltipAttributeMethods: ITooltipAttribute {
28    #[doc = "`.ctor(::unity::Il2CppString)` overload"]
29    fn ctor(self, tooltip: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
30        unsafe {
31            let __receiver = <TooltipAttribute as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
32            ::unity::il2cpp_call!((::unity::module_base()+0x378ec20usize)as*mut u8,();
33(TooltipAttribute)__receiver,(::unity::Il2CppString)::core::convert::Into::into(tooltip))
34        }
35    }
36}
37
38#[cfg(feature = "unity_engine-tooltipattribute")]
39impl<__T: ITooltipAttribute> ITooltipAttributeMethods for __T {}
40
41#[cfg(feature = "unity_engine-tooltipattribute")]
42impl TooltipAttribute {
43    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
44        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
45    }
46}
47
48#[cfg(feature = "unity_engine-tooltipattribute")]
49impl TooltipAttribute {
50    #[doc = "`.ctor(::unity::Il2CppString)` — overload selector"]
51    pub fn new(tooltip: ::unity::Il2CppString) -> Self {
52        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
53            panic!(
54                "{}
55::{}
56 failed to instantiate",
57                ::core::stringify!(TooltipAttribute),
58                ::core::stringify!(new),
59            )
60        });
61        <Self as ITooltipAttributeMethods>::ctor(this, tooltip);
62        this
63    }
64}
65
66#[cfg(feature = "unity_engine-tooltipattribute")]
67#[doc(hidden)]
68pub mod prelude {
69    pub use super::{ITooltipAttribute, ITooltipAttributeMethods, TooltipAttribute};
70    #[cfg(feature = "system-object")]
71    pub use crate::system::object::IObjectMethods;
72    #[cfg(feature = "unity_engine-propertyattribute")]
73    pub use crate::unity_engine::propertyattribute::IPropertyAttributeMethods;
74    pub use crate::{system::object::IObject, unity_engine::propertyattribute::IPropertyAttribute};
75}