Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore readonly fields #164

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

TsFreddie
Copy link
Contributor

I believe Unity does not serialize readonly fields.

I've checked in Unity 2022.3.32f using this really simple script.

using UnityEngine;
public class Test : MonoBehaviour
{
    public readonly int ReadonlyValue = 1;
    public int Value = 2;
}

Unity:
image

TriInspector (1.14.0):
image

Debug (for reference):
image

@TsFreddie TsFreddie reopened this Jun 12, 2024
@vanifatovvlad vanifatovvlad merged commit 6c844f0 into codewriter-packages:main Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants