summaryrefslogtreecommitdiffstats
path: root/modules/multiplayer/multiplayer_spawner.cpp
diff options
context:
space:
mode:
authorGeorge L. Albany <Megacake1234@gmail.com>2024-11-21 05:02:23 +0000
committerGitHub <noreply@github.com>2024-11-21 05:02:23 +0000
commitc5b1645e60a59c0292c04bece3fdb0715a61afea (patch)
treeb03c5b5de96e29ffb7e1b008912d21aba5629bc5 /modules/multiplayer/multiplayer_spawner.cpp
parentfd9045fe09e9bea691f0169c16d45cbebddb6bba (diff)
parent9857e4762b8d076259c4be863ba9f53df306d940 (diff)
downloadredot-engine-c5b1645e60a59c0292c04bece3fdb0715a61afea.tar.gz
Merge pull request #875 from Spartan322/merge/9e60984
Merge commit godotengine/godot@9e60984
Diffstat (limited to 'modules/multiplayer/multiplayer_spawner.cpp')
-rw-r--r--modules/multiplayer/multiplayer_spawner.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/multiplayer/multiplayer_spawner.cpp b/modules/multiplayer/multiplayer_spawner.cpp
index 946f89405b..87a1f5eb89 100644
--- a/modules/multiplayer/multiplayer_spawner.cpp
+++ b/modules/multiplayer/multiplayer_spawner.cpp
@@ -99,7 +99,13 @@ PackedStringArray MultiplayerSpawner::get_configuration_warnings() const {
void MultiplayerSpawner::add_spawnable_scene(const String &p_path) {
SpawnableScene sc;
- sc.path = p_path;
+ if (p_path.begins_with("uid://")) {
+ sc.uid = p_path;
+ sc.path = ResourceUID::uid_to_path(p_path);
+ } else {
+ sc.uid = ResourceUID::path_to_uid(p_path);
+ sc.path = p_path;
+ }
if (Engine::get_singleton()->is_editor_hint()) {
ERR_FAIL_COND(!ResourceLoader::exists(p_path));
}
@@ -141,7 +147,7 @@ Vector<String> MultiplayerSpawner::_get_spawnable_scenes() const {
Vector<String> ss;
ss.resize(spawnable_scenes.size());
for (int i = 0; i < ss.size(); i++) {
- ss.write[i] = spawnable_scenes[i].path;
+ ss.write[i] = spawnable_scenes[i].uid;
}
return ss;
}