Heyy Everyone i am facing some issues with the point light, what i am trying to do is activating my point light every time my enemy got hit and create an good looking effects and i am trying to do that in c# as an gameobject, i am taking an gameobject refrence and “setActive” it to true but it’s not working i tried debugging using messages and it everything was working fine but the light gameobject was not getting activated and idk why.
so depends where the heck you call that from, but if you’re getting the debug logs, you must be calling it from somewhere, but are there any errors? cos if you get the debugs and not the light it implies bleedinglighteffect is null. but i would throw a nullreferenceexception
Nahh there’s no errors and it’s not null also i have assigned the bleeding Effect prefab in the inspector but only thing that’s different is there’s animation on the light but i don’t think that’s matter as the whole gameobject itself is not getting activated
i cant really tell based on what you’ve said so just get back to me when you have the time: your light is actually in the scene/on the game object right. if you’re putting in a prefab of the light and not an actual light game object, you should use Instantiate(). Other than that, what bugfinders said is also possible, if you try to activate a child while its parent is still inactive, your child wont activate either