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

Fix lua class Index #314

Merged
merged 2 commits into from
Dec 23, 2021
Merged

Conversation

xiejiangzhi
Copy link
Contributor

@xiejiangzhi xiejiangzhi commented Dec 19, 2021

bug: 如果 super 中不存在的值为设置为 NoExist ,而 child 有这个值的话,child 也只能取到 nil 值。
修改: 在 super 检查中,忽略 NotExist.

测试例子:

创建一个蓝图类 BP_A,然后又增加了一个 BP_A 的子类蓝图 BP_A_Child, 并在 BP_A_Child 中加入了一个 Cube Component

然后在 Lua 中,BP_A 有 BP_A_C, BP_A_Child_C 继承 lua class BP_A_C。

任何时候, 如果 BP_A_C 中尝试去检查 self.Cube 就会将 mt 设置为 NoExist。 之后 BP_A_Child_C 虽然有 self.Cube, 但因为 Super 已经把 Cube 设置为 NoExist, 他将永远取不到 self.Cube 了。

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

Successfully merging this pull request may close these issues.

None yet

2 participants