FyroxEngine / Fyrox

3D and 2D game engine written in Rust
https://fyrox.rs
MIT License
7.76k stars 353 forks source link

Add `clone_value` for `trait Reflect` #334

Closed mrDIMAS closed 2 years ago

mrDIMAS commented 2 years ago

There is one thing missing in Reflect trait that prevents creating "generic" SetPropertyCommand - the ability to clone the thing that implements Reflect. There should be a clone_value method that will create a boxed clone of the self.

mrDIMAS commented 2 years ago

It turned out that it is not needed, it is easier to return previous value when setting new (https://github.com/FyroxEngine/Fyrox/commit/489e045b7ab4f28d4ba2a49417e860bf7c319e9d). Closing this one.