瀏覽代碼

Fix Thread usage in UPNP docs.

The threading API has changed between Godot 3 and Godot 4.
See https://github.com/godotengine/godot-proposals/issues/4691.
TechnoPorg 3 年之前
父節點
當前提交
4c06237b93
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      modules/upnp/doc_classes/UPNP.xml

+ 1 - 1
modules/upnp/doc_classes/UPNP.xml

@@ -41,7 +41,7 @@
 
 		func _ready():
 		    thread = Thread.new()
-		    thread.start(self, "_upnp_setup", SERVER_PORT)
+		    thread.start(_upnp_setup.bind(SERVER_PORT))
 
 		func _exit_tree():
 		    # Wait for thread finish here to handle game exit while the thread is running.