Scene-less Nodes/TransformNodes

I’m working on a project and need a TransformNode but don’t have a scene since scenes (which are worlds/saves in said project) are generated dynamically. Except for one issue: Node requires a scene, so it throws an error from the highlighted line:

From an engine perspective, do we need to have a scene with Nodes? There isn’t any geometry, though it could change some behavior (e.g. the getScene() method).

We can have the scene parameter in the constructor be optional and have another method for setting a scene.

The build fails with a ton of null errors - which makes since. Maybe instead we could have a default scene created with engine instantiation?

cc @GeneralQuestions

1 Like

I commented on the PR but I really do not think we should do this change :frowning:

In your project why not creating a dummy scene with NullEngine ?

1 Like

Thanks @sebavan!

The reason I needed a no-scene node was for creating default playerData in the project…

Instead of rewriting the engine, it would make more sense to simply code the project not to need default data, which I’ve been trying to remove anyway…

1 Like

Could you use the dummy to create the TransformNode then:

delete tNode._scene;
delete tNode.unique;

? Seems like you end up with the exact same object.