Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Dumuz |
I have no idea what this means, I’ve never seen this warning and I can’t find anyone else that’s had it.
" _parse_connections: Condition “!common_parent” is true. Continuing. "
func _on_Toy_btn_pressed():
var x = range(0,10)
var highlight = Button.new()
var empty = StyleBoxEmpty.new()
highlight.rect_min_size = Vector2(100,100)
highlight.set('custom_styles/normal', empty )
highlight.connect("pressed",pet,"_praise",["toy","doll"],2)
highlight.connect("pressed",self,"_clean_up",[highlight.get_instance_id()],2)
var highlighted = PackedScene.new()
highlighted.pack(highlight) #--------------This is where my error is.
for c in x:
$Inv_GUI/inv_cont.get_child(c).add_child(highlighted.instance())
continue
This only happened after I added the enum flags (2)
at the end of my signals
, in an attempt to keep the buttons
working after the scene is packed for instancing
. Before that, my signal connect
weren’t working at all.
So, I didn’t find the answer. But I got the buttons to work. Turns out the connect()
methods had to be applied to the instance after it was created at the bottom.
If anyone knows what the error meant and why, I’d appreciate it. just for knowledge purposes.
Dumuz | 2020-02-15 23:25
Hi all, I am a Godot newbie. I had the same error but it was due to other reasons. Thought I’d add a comment in case this helps someone else resolve their issue.
Like njamster mentioned, reading “!common_parent” out loud to say “not common parent” helped me find the solution, as in “whatever you’re trying to do is throwing an error because something does not have a common parent.”
I realized that the issue was the .tscn import I was doing. I had edited the children in the main scene GUI, but what I need to do is OPEN the .tscn in a new tab by clicking on the film icon, make whatever edits I want there, save, and close the tab. The edits I was making was essentially not popping up in the .tscn file, so the parent was misplaced–Godot couldn’t recognize a common parent! After I make those fixes, now the edits appear in the main GUI without the “!common_parent” error.
(For reference, I created the .tscn file by exporting from Blender using this exporter: Blender ESCN exporter — Godot Engine (stable) documentation in English. I then renamed the .escn file to .tscn because for some reason sometimes Godot didn’t recognize the .escn extension. Someone mentioned in some thread somewhere that .escn was becoming obsolete and Godot treats .tscn and .escn the same way anyways, so now I always change the .escn extension to .tscn. Phew!)
jchillen | 2020-07-13 00:01