How to make gameobject invisible but still cast shadows without mesh renderer?
Asked Answered
C

2

0

I’m very new to unity.

How to make gameobject invisible but still cast shadows without Mesh Renderer?

My model doesn’t have a Mesh Renderer, which is the only way I can think about doing this. When I add a Mesh Renderer, it does nothing.

Carlile answered 26/3, 2024 at 18:43 Comment(0)
T
0

It needs a Mesh Renderer to cast shadows.

Solution

Add the Mesh Renderer back, and set the alpha on the material to 0. And make sure that Cast Shadows ☑ is ticked. And for the surface that is receiving shadows, make sure to enable Can Receive Shadows ☑ (both in the Inspector).

Twocycle answered 26/3, 2024 at 18:45 Comment(0)
P
0

This was resolved in the latest Unity-2022-3-LTS release to the date of this comment.

Under the mesh renderer component Select Cast Shadows Shadows Only.

Psychosocial answered 26/3, 2024 at 18:46 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.