Question by
Yumera · May 07, 2019 at 07:26 AM ·
unityeditor
Why should I use 'SerializedProperty' ?
hi
I've used a Custom class without a SerializedProperty. It does not give any error and it works well Below code works well
example code :
public override void OnInspectorGUI()
{
// not used
//SerializedProperty element = serializedObject.FindProperty("fileName");
//EditorGUILayout.TextField("Name", element.stringValue);
// use CustomEditor ..
// private void OnEnable() { module = (CustomClass)target; }
EditorGUILayout.TextField("Name", module.currentSound.fileName);
}
BTW, I just wonder why should I have to use the SerializedProperty Could you help me?
Comment
Your answer

Follow this Question
Related Questions
Namespace inside DLL file 0 Answers
Build APK with Jenkins 1 Answer
IAP works in Editor but not working in Play Store or IOS 0 Answers
il2cpp.exe did not run properly, a python compile error 1 Answer