The use of unique_ptr is a bad choice for SceneNodes, why are you using unique_ptr and then create other pointers using get() in your World class ?
Because it describes the ownership semantics best. It doesn't matter whether there are additional pointers or references to the object stored in the
unique_ptr, as long as its validity can be ensured. It's like having pointers or references to any other object.
But the SceneNodes are not owned by one ressource, World class also owns SceneNodes who were intended to be owned by only one ressource.
Not "also". The
World class is the sole owner of the scene graph (that is, the root scene node). Every scene node owns its children. It's as simple as that.
The other references and pointers do not express an ownership relation, but a pure indirection. Ownership means being responsible of an object's lifetime. This is clearly not the case for the raw pointers that point to dedicated scene nodes, because the world is not supposed to destroy them through those pointers. The scene graph will take care of their destruction by itself.
The use of unique_ptr in this case is only complicating things, it would be much simpler and senseful with shared_ptrs.
The opposite is the case.
shared_ptr looks easy to use, but it tends to make people think less about ownership semantics. Instead of having a clear owner, you distribute ownership over multiple instances in the hope that you needn't care about who cleans up. Don't use shared pointers as a GC replacement; it has been conceived for cases where you have shared ownership -- i.e. multiple instances that own one object and you cannot determine a single one which is responsible of it. Keep in mind that
shared_ptr not only comes with some overhead, but it also enables memory leaks through cyclic references.
To understand our design choices better, I recommend reading
this post.