Unity LWPR does not see some layers - unity3d

I have 2D Unity project with two cameras: the main one and one designed for parallax effect.
After I installed LWPR for setting lights the second camera stopped showing its layer in game.
Is there a way to fix this?

The practice of rendering two cameras at the same time as you are describing, "camera stacking", is not currently supported on LWRP or URP. There is some discussion about adding support for it again.
You could try using a camera to render onto a render texture and display that as your background.
For the 2D light, it is present but is greyed out. You should be able to enable experimental feature use in the player settings for the project.

Related

Show the Unity particle on the Canvas

I am using Unity version 2021.3.15f
I want to show the particles on the UI canvas.
I'd like to know two things, how to show particle on the canvas when the render mode on the canvas is screenspace-overlay and screenspace-camera.
Do I need to convert the particle's transform into a rectTransform?
Or should I use methods like Camera.ScreenToWorldPosition?
You could always move the camera into a ScreenToWorldPosition and it will work but keep in mind this is just a bandaid fix and won't be robust and maintainable. Usually anything ui related must be compatible with Unity's UI Render Pipeline.
There is this great resource for adding particle effects into UGUI from a github repository.
Use : https://github.com/mob-sakai/ParticleEffectForUGUI
take a look at the sample scenes it has everything you need.

Unity 2D Renderer URP Makes my UI Camera have a background color

I am trying to add lighting to my 2D project, so I created a new Universal Render Pipeline that takes in a 2D renderer. I have 2 separate cameras, one for UI, and one for game elements. The moment I add a pipeline to my project, my UI Camera has a background color, although the clear flags are set to depth only.
What I've tried so far:
Turning of Post-Processing, did not work.
Camera stacking, but it is not available on the 2D Renderer, according to the docs.
Making the camera background color transparent, but the Alpha channel does not seem to affect the color in any way.
The unity version I m working on is 2019.3.4f1
I found the solution. So just in case anyone runs to this problem in the future, make sure you have the latest version of the URP on the package manager, then you will have the option to use camera stacking which works just fine for this case.

Error on Main Camera in Unity: "The renderer used by this camera doesn't support camera stacking. Only Base camera will render."

I just updated my unity version from 2018 to 2019. Also, I've got a new render pipeline for the 2D lights feature, and there is this weird white flickering when my character moves, and even sometimes without movement. I think the Main Camera warning shown in the title is the cause, but I could be wrong. Does anyone have a fix?
I am not sure about the problem you referenced in your description, but as for the error in your title I had a similar problem and it was because I had two cameras in the scene, one overlay and one base, the overlay was for my UI and I was using Universal Render Pipeline with 2D which is not yet supported. So I cannot stack multiple cameras, when I do it will only load the base camera.
https://forum.unity.com/threads/does-urp-support-ui-canvas-overlay.768077/
you may try to select main camera than at inspector section open "rendering" and mark the "renderer" as "UniversalRendererPipelineAsset".
This is because you are using 'deferred' rendering, and camera stacking is only supported on forward rendering.
Either select forward rendering on your Universal pipeline asset, or create a new render pipeline asset with forward rendering and assign it to the camera.
If you are unsure which one to choose, read: https://docs.unity3d.com/Manual/RenderingPaths.html

Unity - World canvas not seen in build executable

I am working on a moba game in unity, with photon and i use world canvas to display the player life. In the edit mode, i can play without any problem, but in build exe, i can't see the world space canvas. i tried using other cameras, the only way i can see those canvases is to set a camera to render target and display the render result in a raw image. Here are the settings:
Is this an unity bug? I am using the lightweight render pipeline from unity 2018.1.3. Or am I doing something wrong?
I fixed it by using 2D sprites

Pause/Freeze a scene with a trackable active in vuforia unity 3d

I am developing an app with vuforia Cloud Recos. I want to add the feature of allowing the user to pause the page so she does not have to keep pointing the device on the target to view the trackable. This is pretty useful when I want to show texts. Is there anyway to achieve that on Unity3D ? A good example is Microsoft's Here City Lens app which includes a button to pause the page as the screenshot shows;
You could take a screenshot of the screen and apply it to an Image UI object. That is if you do not need the camera feed anymore.
If you need interaction with the elements, I would only take a screenshot of the camera feed without items. Get AR camera transform, apply it to a new camera, disable AR camera.Then apply the screenshot to a background plane covering the whole screen. Keep items on as well and they do not listen to Vuforia anymore. You are pretty much recreating a basic Unity scene. The items should not be moving with Vuforia, the camera is. So they are still in the middle and you need to know where was the camera when you took the shot. Your scene is complete