godotengine / godotengine/godot-docs

Is godot-cpp tutorial code supposed to animate within editor?

Open
#11,753 4 comments 0 reactions 0 assignees View on GitHub
area:manual discussion enhancement topic:gdextension
Dominant language
reStructuredText
Stars
5.7k
Forks
3.8k
Avg merge
1d 20h
Merged PRs (30d)
25

Description

**Your Godot version:**
4.6

**Issue description:**
I'm following the tutorial for `godot-cpp` and upon adding the `GDExample` Node to the project, it immediately begins moving around in the editor. This was unexpected to me, and I wonder if it is intended that the `process` method is constantly called even when not running the project or scene.
The tutorial makes it sound like you need to "Run Project" in order to see this in action, but it moves in the 2D layout preview and you can see the Transform Position under Inspector constantly updating regardless. This just strikes me as odd.

I wonder if it could be explained how to differentiate between code that should run **only** during Run project/scene and code that is running all the time including in the project editor.

**URL to the documentation page:**
https://docs.godotengine.org/en/stable/tutorials/scripting/cpp/gdextension_cpp_example.html#using-the-gdextension-module

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.