0 votes

I need to get a list of objects of a given group in the stage before I add this scene to the tree. How to do it?

var vp_Scn1=ResourceLoader.load(es://Test1.scn).instance()
var vp_Spisok=vp_Scn1.**get_nodes_in_group("Predmet")**
in Engine by (361 points)

And the getnodesin_group() method doesn't work?

Works when:


but for scenes not added to the tree is not working. But I need to get the list before the scene will be added to the tree

Well, untill you add the child to the scene it is outside the tree, so I'm not sure you can access it's children, because the node wouldn't even be processing yet I think.

Maybe you can hide it, then add it, do what you need, hen unhide it. I need to test some more, if you have a test scene to spare that would be great.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.