In 4.1.dev d6dde819b, adding a CyclopsConvexBlock node spams errors if done outside of a CyclopsBlocks parent:
res://addons/cyclops_level_builder/tools/tool_block.gd:238 - Invalid get index 'global_transform' (on base: 'Nil').
res://addons/cyclops_level_builder/cyclops_global_scene.gd:238 - Cannot call method 'get_children' on a null value.
res://addons/cyclops_level_builder/tools/tool_block.gd:238 - Invalid get index 'global_transform' (on base: 'Nil').
res://addons/cyclops_level_builder/cyclops_global_scene.gd:238 - Cannot call method 'get_children' on a null value.
res://addons/cyclops_level_builder/cyclops_global_scene.gd:238 - Cannot call method 'get_children' on a null value.
When creating the node, I suggest checking whether its parent is a CyclopsBlocks. If not, print a human-readable error message using push_error() (to let the user know about invalid usage) then queue_free() the node.
The error message could be:
Cannot create a CyclopsConvexBlock node outside of a CyclopsBlock parent. Create a CyclopsBlock parent first, then use the buttons in the 3D editor toolbar after selecting the CyclopsBlock node to create new CyclopsConvexBlocks.
I've updated the code to do some type checking to avoid this spam. i;m hoping to replace the CyclopsBlocks node in the future so this is hopefully temporary.
In 4.1.dev d6dde819b, adding a CyclopsConvexBlock node spams errors if done outside of a CyclopsBlocks parent:
When creating the node, I suggest checking whether its parent is a CyclopsBlocks. If not, print a human-readable error message using
push_error()
(to let the user know about invalid usage) thenqueue_free()
the node.The error message could be: