Skip to content

Commit 5d21a31

Browse files
committed
Add missing tests/6-expose-python-to-godot/main.py
1 parent fd09b67 commit 5d21a31

File tree

1 file changed

+11
-0
lines changed
  • tests/6-expose-python-to-godot

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from godot import register_python_extension_class
2+
3+
4+
def initialize(level: int):
5+
"""Called by Godot-Python during initialization."""
6+
if level != 2: # GDEXTENSION_INITIALIZATION_SCENE
7+
return
8+
9+
from node import MyPythonNode
10+
11+
register_python_extension_class(MyPythonNode)

0 commit comments

Comments
 (0)