Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

忽略空白值引用不会生成代码 #81

Closed
cybasta26 opened this issue Oct 25, 2023 · 3 comments
Closed

忽略空白值引用不会生成代码 #81

cybasta26 opened this issue Oct 25, 2023 · 3 comments

Comments

@cybasta26
Copy link

cybasta26 commented Oct 25, 2023

新版本luban,忽略空白值的引用不会再生成代码
比如example中,ai.xml里的BehaviorTree,其中的blackboard_id因为加了ref,生成的代码里会自动生成一个BlackboardId_Ref。但是如果我把他改成可以忽略空白值的引用,生成的代码里就不会再生成BlackboardId_Ref了。
QQ图片20231025162007

调试了下模版,发现如果用field.ctype.tags['ref']拿到的引用名称是ai.TbBlackboard?,名称里是带着问号的。
看了下源码,在源码TypeTemplateExtension.cs里的GetRefTable接口是这样的,估计GetTag("ref")的返回值带着问号,作为table名去GetCfgTable就失败了,不知道是不是一个BUG

QQ图片20231025162051

@cybasta26
Copy link
Author

Snipaste_2023-10-25_16-33-11
尝试修改了一下源码编译之后,再导出确实就又能生成BlackboardId_Ref了。

@pirunxi
Copy link
Contributor

pirunxi commented Oct 27, 2023

这确实是一个bug。我们会在晚些时候处理它

@pirunxi
Copy link
Contributor

pirunxi commented Nov 7, 2023

已经修复了。v2.1.8版本

@pirunxi pirunxi closed this as completed Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants