godot check if in exported version

In GDScript, you can check if your game is running in the exported version by using the Engine class. The Engine class provides various methods and properties related to the game engine. To check if your game is running in the exported version, you can use the Engine.editor_hint property.

Here's an example code snippet that demonstrates how to check if your game is running in the exported version using GDScript:

if Engine.editor_hint == false:
    # Game is running in the exported version
    print("Game is running in the exported version")
else:
    # Game is running in the editor
    print("Game is running in the editor")

In this example, we check the value of the Engine.editor_hint property. If it is false, it means that the game is running in the exported version. If it is true, it means that the game is running in the editor.

Note that the Engine.editor_hint property is read-only and cannot be modified. It is automatically set by the engine based on the context in which the game is running.

I hope this helps! Let me know if you have any further questions.