[UnityEngine.Scripting.Preserve]
public partial class JsonRealmObjectGroupDetailData : RealmObject
{
///
/// 用户id 为0表示系统 好友的话 后续调用私聊消息需要传递
///
[PrimaryKey]
[UnityEngine.Scripting.Preserve] public string group_id { get; set; } // 将 group_id 设置为主键
[UnityEngine.Scripting.Preserve] public int group_level { get; set; }
[UnityEngine.Scripting.Preserve] public string group_name { get; set; }
[UnityEngine.Scripting.Preserve] public string group_icon { get; set; }
[UnityEngine.Scripting.Preserve] public int in_group { get; set; } = 1;
}
var config = new RealmConfiguration(this.mRealmPath);
config.SchemaVersion = 1;
try
{
// 打开或创建 Realm
return Realm.GetInstance(config);
}
catch (Exception e)
{
Debug.LogError($"DataCatch_RealmSqlBase CreateRealm 222:{e.Message} {e.StackTrace}");
return null;
}
报错 /storage/emulated/0/Android/data/com.XJWL.SSmetaverse/files/metaverseurp_unity/RealmSql/YYZ000000004614/GroupChat_YYZ000000004614_MGP00000321_0.realm Cannot marshal field ‘schema’ of type ‘Configuration’. at Realms.SharedRealmHandle+NativeMethods.open (Realms.Native.Configuration configuration, Realms.NativeException& ex)