actor as seperate struct type
This commit is contained in:
parent
b3608b2968
commit
2131aa59af
|
@ -335,6 +335,7 @@ impl AnyProperty {
|
|||
pub enum AnyStruct {
|
||||
ScriptStruct(UScriptStruct),
|
||||
Class(UClass),
|
||||
Actor(UClass),
|
||||
Function(UFunction),
|
||||
Other(UStruct),
|
||||
}
|
||||
|
@ -349,6 +350,7 @@ impl AsUObject for AnyStruct {
|
|||
Self::ScriptStruct(obj) => obj.as_uobject(),
|
||||
Self::Class(obj) => obj.as_uobject(),
|
||||
Self::Function(obj) => obj.as_uobject(),
|
||||
Self::Actor(obj) => obj.as_uobject(),
|
||||
Self::Other(obj) => obj.as_uobject(),
|
||||
}
|
||||
}
|
||||
|
@ -366,6 +368,8 @@ impl AnyStruct {
|
|||
pub fn from_struct(obj: UStruct) -> Self {
|
||||
if obj.is_a_maybe(&UScriptStruct::static_class()) {
|
||||
Self::ScriptStruct(unsafe { obj.cast() })
|
||||
} else if obj.is_a_maybe(&actor_static_class()) {
|
||||
Self::Actor(unsafe { obj.cast() })
|
||||
} else if obj.is_a_maybe(&UClass::static_class()) {
|
||||
Self::Class(unsafe { obj.cast() })
|
||||
} else if obj.is_a_maybe(&UFunction::static_class()) {
|
||||
|
|
Loading…
Reference in a new issue