浏览代码

fix gen code without newton json

/CloudFunction
siyao 3 年前
当前提交
9e8eba21
共有 2 个文件被更改,包括 9 次插入5 次删除
  1. 12
      Assets/HuaweiService/Editor/cloud_db/ClassTemplate.cs
  2. 2
      Assets/HuaweiService/Editor/cloud_db/GenCode.cs

12
Assets/HuaweiService/Editor/cloud_db/ClassTemplate.cs


namespace HuaweiService.CloudDB.Editor {
public class ClassTemplate {
public Permissions[] permissions;
public ObjectType[] objectTypes;
public System.Collections.Generic.List<Permissions> permissions;
public System.Collections.Generic.List<ObjectType> objectTypes;
[Serializable]
public PermissionInfo[] infos;
public System.Collections.Generic.List<PermissionInfo> permissions;
[Serializable]
[Serializable]
public Field[] fields;
public System.Collections.Generic.List<Field> fields;
[Serializable]
public class Field {
public bool isNeedEncrypt;
public string fieldName;

2
Assets/HuaweiService/Editor/cloud_db/GenCode.cs


public void GenerateModels (ObjectType objectType) {
string objectTypeName = objectType.objectTypeName;
Field[] fields = objectType.fields;
Field[] fields = objectType.fields.ToArray();
string path = ExportFileDir + $"/{objectTypeName}.cs";
Debug.LogFormat ("Generating Class: {0}.", objectTypeName);

正在加载...
取消
保存