请教关于FJsEnvImpl::TryBindJs中的判断逻辑 #1848
Answered
by
chexiongsheng
watsonsong
asked this question in
Q&A
-
在FJsEnvImpl::TryBindJs中有如下判断逻辑:
这里的逻辑机制没太看明白。如果Cast(Class)失败,TypeScriptGeneratedClass为空的话,Class == UTypeScriptGeneratedClass::StaticClass()这一句肯定不会相等的吧。但后面那个else分支还能进去,是否这里有什么UE的机制。 另外想了解一下这几个分支分别对应的逻辑情况,万分感谢~~ |
Beta Was this translation helpful? Give feedback.
Answered by
chexiongsheng
Sep 24, 2024
Replies: 1 comment 1 reply
-
不是什么UE的机制,是你理解有误。 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
watsonsong
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
不是什么UE的机制,是你理解有误。
Cast失败表示Class不是UTypeScriptGeneratedClass的实例。
Class == UTypeScriptGeneratedClass::StaticClass表示InObject是UTypeScriptGeneratedClass的实例。