You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it will only work if collisionshape not only added inside savedscene, but also configured (shape created) in its hyerarchy and not in game scene hyerarchy.
and if you move such (with enabled editable children) collisionshape (part of saved scene) somewhere down (for example putting it after an added sprite node (inside game scene i mean)), there would appear two collisionshapes, one read and one white, but you couldn't delete ant of them anymore.
i was trying to create a general staticbody2d with script, that would represent different types of platforms, depending on settings i setup in exported script options. the only things i planned to edit manually - adding sprite nodes and collisionshape (one) as children of that instanced saved scene, but now it is impossible to implement.
godot 2.2 latest.
The text was updated successfully, but these errors were encountered:
func_ready():
forshapeinget_children():
ifshape.has_meta("__registered") andshape.get_meta("__registered"):
continueget_tree().set_editor_hint(true)
remove_child(shape) # Make it pick up the editor hintadd_child(shape)
get_tree().set_editor_hint(false) # Unset quicklyifshapeextendsCollisionShape2D: # Now update parent is working, so just change the shapeshape.set_shape(shape.get_shape())
elifshapeextendsCollisionPolygon2D:
shape.set_polygon(shape.get_polygon())
remove_child(shape) # Reset its editor hint cache, just in case it was needed.. (you might drop this part if it bottlenecks)add_child(shape)
shape.set_meta("__registered", true)
it will only work if collisionshape not only added inside savedscene, but also configured (shape created) in its hyerarchy and not in game scene hyerarchy.
and if you move such (with enabled editable children) collisionshape (part of saved scene) somewhere down (for example putting it after an added sprite node (inside game scene i mean)), there would appear two collisionshapes, one read and one white, but you couldn't delete ant of them anymore.
i was trying to create a general staticbody2d with script, that would represent different types of platforms, depending on settings i setup in exported script options. the only things i planned to edit manually - adding sprite nodes and collisionshape (one) as children of that instanced saved scene, but now it is impossible to implement.
godot 2.2 latest.
The text was updated successfully, but these errors were encountered: