I found a generated ‘DBPlayer_generated’ by unity realm sdk, it may be the problem. It set some field to nullable is true, but my player.cs is not nullable field. Now, I am finding the document about how to make it correct.
Solved it.
I had to add the ‘required’ property for the string type. Although I eventually found this information in the documentation, it was easy to overlook. I suggest that the auto-generated schema example in the web UI should include it.
The issue is that the generated models assume that nullable reference types are enabled in your project, which is the default for regular .NET projects, but it isn’t for Unity. We have an item in the backlog to allow customizing that, but haven’t gotten to it yet.