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

场景中无light时会报错 #196

Open
constly opened this issue Jul 28, 2024 · 3 comments
Open

场景中无light时会报错 #196

constly opened this issue Jul 28, 2024 · 3 comments

Comments

@constly
Copy link
Contributor

constly commented Jul 28, 2024

[2024-07-28 22:58:32.32][ERROR]( ant.window|window ) attempt to index a nil value (local 'D')
stack traceback:
        ( service:6 )
        F:/ant/ant/pkg/ant.render/shadow/shadow_system.lua:268: in upvalue 'init_light_info'
        F:/ant/ant/pkg/ant.render/shadow/shadow_system.lua:343: in local 'func'
        F:/ant/ant/pkg/ant.world/main.lua:379: in upvalue 'update_func'
        F:/ant/ant/pkg/ant.world/main.lua:404: in field '_pipeline_update'
        F:/ant/ant/pkg/ant.world/main.lua:588: in method 'pipeline_update'
        F:/ant/ant/pkg/ant.window/service/window.lua:81: in upvalue 'f'

可否在D为nil时,shadow_sys:update_camera_depend()函数直接return ~

@ylme
Copy link
Contributor

ylme commented Jul 28, 2024

别说,我在跑 editor 碰见这个报错时,在 shadow_sys:update_camera_depend 下面加上如下的 if 判断,编辑器就打开了

if not D then
    return
end

@cloudwu
Copy link
Contributor

cloudwu commented Jul 29, 2024

应该是最近改出来的,我昨天也碰到了。cc @junjie020

@cloudwu
Copy link
Contributor

cloudwu commented Aug 1, 2024

9dbc8e5 这个应该修了这个问题。但深层次的问题还需要斟酌。

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

3 participants