hot reload only on edited property

This commit is contained in:
Rendo 2025-07-17 21:13:56 +05:00
commit 359b193ddf
2 changed files with 4 additions and 5 deletions

View file

@ -40,9 +40,8 @@ public partial class AdventureEditor : MarginContainer
}
public void OnInspectorPropertyChanged(string property)
{
if (EditorInterface.Singleton.GetInspector().GetEditedObject() is AdventureLevelResource resource)
if (EditorInterface.Singleton.GetInspector().GetEditedObject() is AdventureLevelResource resource && resource.ResourcePath == editedPath)
{
editedPath = resource.ResourcePath;
HardReload();
}
}

View file

@ -9,14 +9,14 @@
script = ExtResource("3_cugtx")
zombiesOrdered = Array[ExtResource("4_y1e37")]([])
events = Array[ExtResource("2_otfbt")]([])
customWaveDelay = -1.0
customWaveDelay = 0.0
isHugeWave = false
[resource]
script = ExtResource("1_46lr8")
startSun = 50.0
wavePercentage = 0.0
standardWaveDelay = 0.0
initialWaveDelay = 0.0
standardWaveDelay = 30.0
initialWaveDelay = 1.0
waves = [SubResource("Resource_qsvr4")]
initialScenes = Array[PackedScene]([null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null])