puerts icon indicating copy to clipboard operation
puerts copied to clipboard

[Unity] 导出Typescript的Typing文件时, 某些类定义会导致 index.d.ts 无法生成且Unity闪退

Open PleijaNet opened this issue 5 years ago • 0 comments

Unity: 2019.4.16 Puerts: Tag:v1.0.6,Plugin_Version:7

比如这种, 定义时有类似循环引用的情形 public abstract class IWebRpc<T> where T : IWebRpc<T> { } 问题可能出现在 Generator.cs 文件里面的 public static bool IsDelegate(Type type) 或者 static void AddRefType(HashSet refTypes, Type type) 这两个方法在使用 type.BaseType 的时候缺少判断, 使用 type.FullName ==null 或者 !type.IsGenericParameter 的判断条件似乎可以解决

PleijaNet avatar Dec 08 '20 07:12 PleijaNet