Wouldn’t it be better to use nameof() when getting the property of the serializedObject since we are using the same class.
var serializedObject = new SerializedObject(this);
var property = serializedObject.FindProperty(nameof(uniqueIdentifier));
Wouldn’t it be better to use nameof() when getting the property of the serializedObject since we are using the same class.
var serializedObject = new SerializedObject(this);
var property = serializedObject.FindProperty(nameof(uniqueIdentifier));
Generally, yes. It’s probably not something Sam thought of right away since in this case we’re using SerializedObject outside of a traditional Editor/OnInspectorGUI setting.
This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.