mirror of
https://github.com/codewriter-packages/Tri-Inspector.git
synced 2025-01-22 00:08:51 -05:00
Ignore readonly fields
This commit is contained in:
parent
0c5b8f4480
commit
6c844f0b69
@ -14,6 +14,11 @@ namespace TriInspector.Utilities
|
||||
|
||||
public static bool IsSerializableByUnity(FieldInfo fieldInfo)
|
||||
{
|
||||
if (fieldInfo.IsInitOnly)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (fieldInfo.GetCustomAttribute<NonSerializedAttribute>() != null ||
|
||||
fieldInfo.GetCustomAttribute<HideInInspector>() != null)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user