aboutsummaryrefslogtreecommitdiff
path: root/src/classes/gameobject.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-03-12 22:53:23 +0100
committermetamuffin <metamuffin@disroot.org>2025-03-12 22:53:23 +0100
commite4d1504b1d7e575702895d93781f3650ff190bb3 (patch)
treeb19859e6c60964a9b965d1b9e1f9b38880912a94 /src/classes/gameobject.rs
parent5555c8bbefb4f52f5002603eb91b6c95cbdd97e4 (diff)
downloadunity-tools-e4d1504b1d7e575702895d93781f3650ff190bb3.tar
unity-tools-e4d1504b1d7e575702895d93781f3650ff190bb3.tar.bz2
unity-tools-e4d1504b1d7e575702895d93781f3650ff190bb3.tar.zst
cleanup
Diffstat (limited to 'src/classes/gameobject.rs')
-rw-r--r--src/classes/gameobject.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/classes/gameobject.rs b/src/classes/gameobject.rs
index bb4f19b..d629231 100644
--- a/src/classes/gameobject.rs
+++ b/src/classes/gameobject.rs
@@ -11,6 +11,7 @@ pub struct GameObject {
pub name: String,
pub is_active: bool,
}
+
impl FromValue for GameObject {
fn from_value(v: Value) -> Result<Self> {
let mut fields = v.as_class("GameObject").unwrap();
@@ -28,9 +29,7 @@ impl FromValue for GameObject {
.map(|e| {
e.as_class("ComponentPair")
.unwrap()
- .remove("component")
- .unwrap()
- .parse::<PPtr>()
+ .field("component")
.unwrap()
})
.collect(),