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

直接将TsComponent挂载到物体js不执行 #3

Open
ikilobyte opened this issue Jul 29, 2023 · 1 comment
Open

直接将TsComponent挂载到物体js不执行 #3

ikilobyte opened this issue Jul 29, 2023 · 1 comment

Comments

@ikilobyte
Copy link

看示例是创建一个prefab,然后通过Instantiate才会生效,如何直接在物体上挂着TsComponent就能生效?
image

@ikilobyte ikilobyte changed the title 直接将TsComponent挂载到物体上生效 直接将TsComponent挂载到物体js不执行 Jul 29, 2023
@zgz682000
Copy link
Owner

示例里Instantiate是因为运行时需要确保JsEnv已经运行了,才能加载任何物体上的TsComponent组件。跟编辑器里显不显示没关系。
编辑器里不显示应该是Editor环境下的jsEnv配置的不对

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