We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4e75147 + 7a9ee11 commit b7cbac1Copy full SHA for b7cbac1
addons/block_code/block_code_node/block_code.gd
@@ -67,6 +67,12 @@ func _update_parent_script():
67
68
func _get_configuration_warnings():
69
var warnings = []
70
+ if self.owner == null:
71
+ warnings.append("A BlockCode must not be a root node.")
72
+ if get_parent() is BlockCode:
73
+ warnings.append("The parent must not be a BlockCode.")
74
+ if get_parent().find_children("*", "BlockCode", false).size() > 1:
75
+ warnings.append("The parent should only contain one BlockCode.")
76
if block_script and _get_custom_or_native_class(get_parent()) != block_script.script_inherits:
77
var warning = "The parent is not a %s. Create a new BlockCode node and reattach." % block_script.script_inherits
78
warnings.append(warning)
0 commit comments