GameObject with DirectionalLight component not being iluminated - unity3d

I'm doing an augmented reality application using Unity3D and Vuforia. For each gameObject in my augmented reality scene I add a Light component to it and define it as a DirectionalLight.
In this scene the gameObjects are iluminated, but when I change to another scene (not destroying the gameObjects) they are not.
I already checked and they still have the Light component, but are not iluminated for some reason.
Do you guys have any clue of what might be the problem?
P.S.: The second scene is a normal scene with no interaction with the phone's camera. And the projection on the camera is orthographic.

Without more detail it's difficult to say with certainty, but the first thing I would suspect is whether you've culled layers on your lights or your cameras.
What "Layer" are the lights on? Are the cameras set to ignore these layers?
What "Layers" are the lights set to illuminate? Are the objects on these layers?

Related

URP camera stacking causes character meshes to break

First of all, please understand that I am using a translator.
I'm making a first person game and I've split it into two cameras. A camera that renders the main camera and the player's arms. FYI it's a URP and the camera sometimes doesn't render the hand mesh for the player's arm.
I have no idea what the heck is going on.

how can I make a player hidden by terrain always visible?

I am making a 3D isometric game, in my game, there is a lot of holes and the player can go into them, but the problem is when he goes into one of them he becomes invisible, I can,t move the camera it will change the concept I tried using shader like the one in this video but it makes the entire terrain transparent and glitchy (I am using unity terrain) so I am stuck and I need Idea how to make the layer visible inside the hole
What you're asking can be achieved in multiple ways, depending on your render pipeline and requirements.
If you're working with the Universal Render Pipeline (URP), you could create a Forward Renderer asset and create a custom render pass whenever your player is occluded by terrain.
You could assign a new Layer to the player, such as "Player", then select or deselect said mask from the Filters > Layer Mask properties of the Forward Render Data. Then assign the same or a custom material for when the player is occluded by terrain.
Alternatively, you could create either a cutout or a dither shader using Shader Graph, on which there are many tutorials
Camera GameObjects give you the option to select what layer you want them to "see" (render) using the culling mask. Think of layers as grouping GameObjects and giving that group a name.
You can have multiple cameras at the same time each one with a different name and different layer to render, or even change the viewing layer of a single camera depending on changes happening in the game.
Assign a layer tag in each of the terrain elements in your scene and have the camera render them accordingly and "cull" the rest.
Very helpful documentation on layers and camera culling mask.

How to have Unity Particle System render behind other GameObjects

I am using Unity Particle System to generate confetti when a user has finished a level. However, I am not able to have the particles appear behind the gameobjects. Any help would be appreciated.
I added the particle system to a gameobject, created a camera for it and have the camera for the particle gameobject. From there, I set the depth of the gameobject to 0 so that it renders behind the other gameobjects. Did not work.
UPDATE**
I have tried the following solution. However, I am unable to set the camera alpha to 0. I am able to put the particle system to an object but not able to set the camera alpha to 0. How can I do that?
This is what I am seeing.
Particle Camera
You can set the layer of particle system "Particle" and make two cameras, 1 for particle and set occlusion layer to "Particle" and other camera to have all layers except the "Particle" and set its priority higher than the previous camera.

addition scene light issue

I have multiply scenes, one of which is in the combat level, baked with light using light probes. when I load the addition 3D heroes scene with realtime lighting, I can see that the different battle level scenes affect the lighting of the hero scene, but I deactivated all lights except the 3D hero scene. What can affect the scene? And how I can avoid light affect? I use URP

Light in additive loaded scene

Our game is a multiplayer VR game.We have a in game lobby were you select weapons etc and then spawn into the match. The in game lobby gets loaded into the main scene using LoadLevelAdditive.
We disable the mixed mode directional light when you spawn in the lobby and enable it when spawning in match.
Problem is the addtive scene look way different when loaded into the main scene, here are two screens
On its own in editor, here it look as I intended
When loaded additive at runtime
Whats going on here?
This appears to be a light source giving extra lighting to your scene. Check the additive scene for light sources. Check if some gameObject has a light source attached to it (maybe the camera). Note that there's a directional light that's added by default to new scenes.
Also check that this little button is disabled (or enabled if you want):