UNPKG

unity-find-fault

Version:

A tool to find fault in unity project.

37 lines (36 loc) 1.25 kB
import { YamlClassID } from './YamlClassID'; import { TUnityType, UnityEngine, UnityObject } from '../typings/unity.js'; export declare const enum EGUID { Image = "fe87c0e1cc204ed48ad3b37840f39efc", RawImage = "1344c3c82d62a2a41a3576d8abb8e3ea", Toggle = "9085046f02f69544eb97fd06b6048fe2", Outline = "e19747de3f5aca642ab2be37e372fb86", Shadow = "cfabb0440166ab443bba8876756fdfa9" } export interface UnityElement<T = UnityObject> { yamlID: YamlClassID; fileID: string; stripped: boolean; type: TUnityType; object: T; /**for MonoBehaviour, the key is MonoBehaviour_${fileID} */ components: { SpriteRenderer?: UnityElement<UnityEngine.SpriteRenderer>; SpriteMask?: UnityElement<UnityEngine.SpriteMask>; } & { [type: string]: UnityElement; }; father?: UnityElement; children: UnityElement[]; } export type Prefab = UnityElement[]; export declare class PrefabParser { static readonly SectionHeader: RegExp; private unityStruct; /**解析Prefab,获得根GameObject为起点的GameObject树 */ parse(filePath: string): Promise<Prefab>; private parseUnityElement; private getDesciption; dumpDescribor(): void; private getDescriptionStr; }