Closed BocuD closed 2 years ago
Most of this would be made redundant by using SerializedProperties in custom inspectors. When automating component changes without using SerializedProperties marking the object as dirty and then calling PrefabUtility.RecordPrefabInstancePropertyModifications(behaviour); will take care of this.
Discussed on Discord for context: https://discord.com/channels/652715801714884620/690799234991259708/956270013835255808
Feature Description: This would be a function on the base UdonSharpBehaviour class that checks if the gameobject the target behaviour is on is part of any prefab, and if yes, records prefab instance modifications for the behaviour. It could speed up adding proper prefab support to custom inspectors and editor scripts.
Additional context: For example something like this:
In the custom inspector, you could then simply do