import { CCClass } from "cc"; export class editorConstValue { static getEnumList(value:any){ let list: { name: string, value: number }[] = []; for (const key in value) { const element = value[key]; if (/^[0-9]+$/.test(key)) { } else { list.push({ name: key, value: element, }) } } return list; } static reSetEnumArr(target, attName: string,value:any, key: string = "enumList") { CCClass.Attr.setClassAttr(target, attName, key,this.getEnumList(value)); } static reSetKeyValueArr(target, attName: string, key: string, value) { CCClass.Attr.setClassAttr(target, attName, key,value); } }