Problem with JSONUtilityJSONUtility

Hey guys, had a quick question about this if anyone happens to know. I have a script with a bunch of private variables that i use getters and setters to access but when trying to serialize with JSONUtility it doesnt acknowledge the getters and setters (only serializing public variables). Any way around this other than just dropping serializefield on every single variable in the script? Thanks in advance!

No. You need to use SerializeField. (I’m including a link to the Serialization in Unity blog post here in case it’s useful.)

Thanks Tony, I figured a way to get around it, but that link was useful, thanks!