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

Invalid get index 'omni_range' (on base: 'Nil'). #3

Open
WilliamTambellini opened this issue Feb 21, 2022 · 0 comments
Open

Invalid get index 'omni_range' (on base: 'Nil'). #3

WilliamTambellini opened this issue Feb 21, 2022 · 0 comments

Comments

@WilliamTambellini
Copy link

To prevent an exception/error if the parent light is a spotlight:

material.set_shader_param("size", light_size * (light as OmniLight).omni_range)

Switch:

material.set_shader_param("size", light_size * (light as OmniLight).omni_range)

to

if light is OmniLight:
	material.set_shader_param("size", light_size * (light as OmniLight).omni_range)

or similar similar (warning, ...)

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

1 participant