kMirrors icon indicating copy to clipboard operation
kMirrors copied to clipboard

Sample Project?

Open andybak opened this issue 5 years ago • 11 comments

I'm being especially dumb today but I can't get this to work. The Wiki implies I just need to add it to a scene but I can't see anything in the scene or game view other than a transform gizmo. Am I supposed to do something with kShading as well? The

Any chance you could include a demo scene? It's nice to start from a working example.

andybak avatar Feb 11 '20 18:02 andybak

Same here. Cant get this to work

jojizaidi avatar May 27 '20 09:05 jojizaidi

Can't get this to work either... using URP and kshading.

LandoRingel avatar Jul 21 '20 23:07 LandoRingel

I got it working. What i was missing was a CameraShade script on my camera, plus assigning it an object to shade and the material associated with it.

jojizaidi avatar Jul 22 '20 08:07 jojizaidi

For me setup was little bit difficult too. Package pretty cool. Here simple example for using with URP. Thanx @Kink3d

Tokars avatar Sep 10 '20 11:09 Tokars

@Tokars didn't work too, looks like isn't compatible with newer URP version or deferred, the plane is invisible, it appears when set to transparent (yes it's a opaque layer), and then it appears without any reflection. There is no "mirror" reflection option.

JuniorDjjr avatar Feb 23 '22 20:02 JuniorDjjr

Tokars sample works for me (which I am very happy and thankful about) with URP11 and Unity 2021.1.28. Even URP12 in 21.2 (which is a huge surprise tbh) Setting it up without the sample in my project yielded some issues (like does not work with camera stacking) but in the sample project it works. So I guess I will just have to dig around a bit to figure out whats wrong, but with the sample project I can at least be sure that it is working at all.

fleity avatar Feb 25 '22 17:02 fleity

I managed to make it work by creating a shader in the shader graph following the documentation (which is very easy), I just tested "local".

I also got the error "You can't nest Foldout Headers, end it with EndHeaderFoldoutGroup." on inspector, but it's solved by simply removing the editor script (I didn't look into what exactly causes this, but the editor script doesn't do anything important, just inspector visual, so it's ok).

JuniorDjjr avatar Feb 25 '22 17:02 JuniorDjjr

Now I'm upd: project to 2020.3.25 editor version. All works ok. @JuniorDjjr discover Mirror.scene and try to re-create by your requirement. @fleity Yes, setup is a bit a difficult. And with stacking camera (Overlay Camera) I was meet too. I don't know if it was fixed in author package. For my need I fix it in my fork by this solution.

Tokars avatar Feb 25 '22 19:02 Tokars

@Tokars I already discovered your fix, thanks for that too :D. Sorry for asking directly but do you know how to make the "render shadows" toggle work and URP renderer drop down for the mirror camera work? I tried changing both but it doesn't make a difference and I would very much like to have that performance option.

Just wanted to add I can reproduce JuniorDjjr's issue, the renderers property which is used when the output dropdown is set to local does not work with the FoldoutHeaderGroup. That sounds suspiciously like a Unity bug though. A simple solution would be to replace FoldoutHeaderGroup with a regular Foldout (literally search and replace these) or as he said omit them altogether.

fleity avatar Feb 28 '22 09:02 fleity

Hi Tokars! Not sure if it's mentioned somewhere, but in my case I had the "default" kMirror and kShaders lines in the Manifest file and I could not make it work. I noticed that in your project (where everything was fine) those dependencies where different and the moment I changed them, it worked! I guess there was some issue with the kShaders. Anyway, thank you all for your contribution!

dikafe avatar Dec 14 '22 11:12 dikafe

For me setup was little bit difficult too. Package pretty cool. Here simple example for using with URP. Thanx @Kink3d

Thanks to this example project. I got it working. I could run it out off the box and found out that the Rotation of the mirror needs to be X = -90 to make it work.

tanat44 avatar Jan 06 '23 11:01 tanat44