+1 vote

Basically ive noticed a few of the classes' functions have inside of them "In-editor" Does thsi only mean they're accessible if you're running the game from the editor or...what does it mean exactly? Because when i try to use the functions for them, they work perfectly fine they just dont show up in the index when partially typing it

in Engine by (484 points)

I am not sure what classes or function you mean. Could you give the name of some of them?

polygoncollision2D for example, the documentation for it states it's ment for ineditor

1 Answer

+1 vote

These nodes are not present when running the game. They are just helper nodes to easily edit the collision shapes (Shape2D derived resources) that are going to be added to a CollisionObject2D (or CollisionObject in 3D).
Take for example a CollisionShape2D that is child of a KinematicBody2D. If you set its shape to a RectangleShape2D, the editor will add this shape to the KinematicBody2D, and you would have to call body.get_shape(index) to access it at runtime.
CollisionPolygon2D does the same as CollisionShape2D would do with a ConvexPolygonShape2D (if Build Mode was set to Solids) or ConcavePolygonShape2D (if Build Mode was set to Segments) with the difference that it let's you add, move and remove the polygon points directly in the canvas editor.

by (488 points)
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 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 webmaster@godotengine.org with your username.