- Home /
This question was
closed May 23, 2016 at 11:32 PM by
HonorCoding for the following reason:
Nevermind, I fixed it. Instead of spawning in a light prefab I created a new gameobject and added a new light.
Question by
HonorCoding · May 15, 2016 at 01:24 PM ·
scripting probleminstantiatelightingrendering
Instantiated light not working properly
I've been having a problem with lighting where game objects that I instantiate are supposed to be lit by a light which is also instantiated in the script during runtime. When I have a light already pre-made in the scene before running the program, the lighting works fine. But when I try to create a light from script, it acts really weird and lights up the entire face of the cube. Is there a way to fix this problem so that I can have good lighting from instantiated lights? (I'm using Unity version 5.3.4f1)
Before (light already in scene before runtime):
After (light instantiated during runtime):
before.png
(42.5 kB)
after.png
(40.4 kB)
Comment