FyroxEngine / Fyrox

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

Give a warning in the editor if an object that is being deleted referenced in other scene objects #370

Closed mrDIMAS closed 1 year ago

mrDIMAS commented 1 year ago

A way to search object usages would be very helpful for cases, when you delete an object an want to ensure that it does not referenced elsewhere. This is quite simple task, all that needs to be done is to search for all Handle<Node> fields via reflection in every object in the scene and if it is match with an object's handle that is being deleted give a warning message box with something like: "This object is being used by X, Y, Z, objects, do you still want to delete it?".