From ed0bc3f37f27e046c7e99ed6f56c10a505ed783c Mon Sep 17 00:00:00 2001 From: Rijad Zuzo Date: Sun, 5 Jul 2026 23:06:51 +0200 Subject: [PATCH] fix: resolve scene dependency errors and missing UID in main.tscn - WaterBody.tscn, WaterfallBody.tscn: gdshader files were referenced with type="Material" instead of type="Shader". Wrapped each shader in a ShaderMaterial sub-resource so Godot can load them. - ChimneySmoke.tscn: reordered sub-resources so StandardMaterial3D is defined before QuadMesh that references it. - WaterfallMist.tscn: fixed node type GpuParticles3D -> GPUParticles3D (case-sensitive class name in Godot 4.7). - jajce_world.gd: added explicit Vector3 type annotation to fix 'Cannot infer the type of pos variable' parse error. - main.tscn.uid: created missing UID mapping file. The scene header declared uid="uid://rs3hv73svbpa" but no .uid file existed, causing Godot to reject the scene as unsupported format. --- main.tscn.uid | 1 + world/jajce/ChimneySmoke.tscn | 12 ++++++------ world/jajce/WaterBody.tscn | 9 ++++++--- world/jajce/WaterfallBody.tscn | 9 ++++++--- world/jajce/WaterfallMist.tscn | 2 +- 5 files changed, 20 insertions(+), 13 deletions(-) create mode 100644 main.tscn.uid diff --git a/main.tscn.uid b/main.tscn.uid new file mode 100644 index 0000000..0cff05d --- /dev/null +++ b/main.tscn.uid @@ -0,0 +1 @@ +uid://rs3hv73svbpa diff --git a/world/jajce/ChimneySmoke.tscn b/world/jajce/ChimneySmoke.tscn index 45b3c49..d55026b 100644 --- a/world/jajce/ChimneySmoke.tscn +++ b/world/jajce/ChimneySmoke.tscn @@ -19,17 +19,17 @@ scale_max = 0.6 color = Color(0.8, 0.8, 0.8, 0.6) alpha_curve = SubResource("2") -[sub_resource type="QuadMesh" id="4"] -size = Vector2(1, 1) -material = SubResource("5") - -[sub_resource type="StandardMaterial3D" id="5"] +[sub_resource type="StandardMaterial3D" id="4"] albedo_color = Color(1, 1, 1, 1) transparency = 1 shading_mode = 0 billboard_mode = 1 cull_mode = 0 +[sub_resource type="QuadMesh" id="5"] +size = Vector2(1, 1) +material = SubResource("4") + [node name="ChimneySmoke" type="GPUParticles3D"] emitting = true amount = 16 @@ -37,5 +37,5 @@ lifetime = 3.0 one_shot = false local_coords = true process_material = SubResource("3") -draw_pass_1 = SubResource("4") +draw_pass_1 = SubResource("5") draw_order = 1 diff --git a/world/jajce/WaterBody.tscn b/world/jajce/WaterBody.tscn index 5394016..2c53cdc 100644 --- a/world/jajce/WaterBody.tscn +++ b/world/jajce/WaterBody.tscn @@ -1,9 +1,12 @@ -[gd_scene load_steps=3 format=3] +[gd_scene load_steps=4 format=3] -[ext_resource type="Material" path="res://world/jajce/materials/water.gdshader" id="1_water_shader"] +[ext_resource type="Shader" path="res://world/jajce/materials/water.gdshader" id="1_water_shader"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_water"] +shader = ExtResource("1_water_shader") [sub_resource type="BoxMesh" id="Mesh_water_body"] -material = ExtResource("1_water_shader") +material = SubResource("ShaderMaterial_water") size = Vector3(5, 0.08, 56) [node name="WaterBody" type="Node3D"] diff --git a/world/jajce/WaterfallBody.tscn b/world/jajce/WaterfallBody.tscn index b083c8c..7dfb0c8 100644 --- a/world/jajce/WaterfallBody.tscn +++ b/world/jajce/WaterfallBody.tscn @@ -1,9 +1,12 @@ -[gd_scene load_steps=3 format=3] +[gd_scene load_steps=4 format=3] -[ext_resource type="Material" path="res://world/jajce/materials/waterfall.gdshader" id="1_waterfall_shader"] +[ext_resource type="Shader" path="res://world/jajce/materials/waterfall.gdshader" id="1_waterfall_shader"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_waterfall"] +shader = ExtResource("1_waterfall_shader") [sub_resource type="BoxMesh" id="Mesh_waterfall_body"] -material = ExtResource("1_waterfall_shader") +material = SubResource("ShaderMaterial_waterfall") size = Vector3(5, 10, 0.5) [node name="WaterfallBody" type="Node3D"] diff --git a/world/jajce/WaterfallMist.tscn b/world/jajce/WaterfallMist.tscn index 6d27879..aff2247 100644 --- a/world/jajce/WaterfallMist.tscn +++ b/world/jajce/WaterfallMist.tscn @@ -16,7 +16,7 @@ alpha_curve = SubResource("Curve_alpha") emission_shape = 1 emission_box_extents = Vector3(2.5, 1.0, 0.5) -[node name="WaterfallMist" type="GpuParticles3D"] +[node name="WaterfallMist" type="GPUParticles3D"] emitting = true amount = 48 lifetime = 2.5