diff --git a/Assets/UdonSharp/Editor/UdonSharpEditorManager.cs b/Assets/UdonSharp/Editor/UdonSharpEditorManager.cs index 7d84d696..f23f8d15 100644 --- a/Assets/UdonSharp/Editor/UdonSharpEditorManager.cs +++ b/Assets/UdonSharp/Editor/UdonSharpEditorManager.cs @@ -495,8 +495,11 @@ static void UpdateSerializedProgramAssets(List udonBehaviours) UdonSharpProgramAsset programAsset = behaviour.programSource as UdonSharpProgramAsset; if (programAsset == null) continue; - - if (_serializedAssetField.GetValue(behaviour) == null) + + AbstractSerializedUdonProgramAsset serializedProgramAsset = _serializedAssetField.GetValue(behaviour) as AbstractSerializedUdonProgramAsset; + + if (serializedProgramAsset == null || + serializedProgramAsset != programAsset.SerializedProgramAsset) { SerializedObject serializedBehaviour = new SerializedObject(behaviour); SerializedProperty serializedProgramProperty = serializedBehaviour.FindProperty("serializedProgramAsset");