diff options
Diffstat (limited to 'src/classes/gameobject.rs')
-rw-r--r-- | src/classes/gameobject.rs | 5 |
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(), |