I have a scene with a game object that has my component.
The component has a HashSet (doesn’t matter what T is) and I want to add a value to it (via a button in custom inspector Editor) but it doesn’t keep when pressing Play and back. I assume the EditorUtility.SetDirty( comp ); doesn’t affect it since its not serializable.
But I do need a solution for this. I thought about making a special List that has ONLY unique values (that’s why I am using HashSet) but perhaps one of your gurus have a fix for my problem.
I am aware that EditorUtility.SetDirty will be depracated at one point, I don’t want to use FindProperty because it has a string parameter and my stuff gets renamed and I’d have to make sure it has the same name as the string >.>
Sort of works mate, except that I would like to have it work by since I will be using this in many places with several different types of
This [Serializable] public class SerializableHashSet : HashSet {} does not work :<
I am going to try to extend list and override add to force unique values, then overriding the inspector to have it look like a Set instead of an ordered list