Search Unity

  1. Check out the Unite LA keynote for updates on the Visual Effect Editor, the FPS Sample, ECS, Unity for Film and more! Watch it now!
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Possible for Canvas UI Objects to Receive Shadows ?

Discussion in 'Unity UI & TextMesh Pro' started by Spuddicus, May 23, 2017.

  1. Spuddicus

    Spuddicus

    Joined:
    Aug 11, 2014
    Posts:
    9
    Does anybody know how to modify the Unity 5.6 built-in UI shaders so that they can receive shadows from 3D objects? My game has a score card in the background created from Text and Image objects and CanvasRenderers. These UI elements are rendered behind 3D objects by setting the Render Mode of the Canvas to Screen Space - Camera. I want these 3D objects to cast shadows onto the UI elements. Is this possible? Thanks!
     
  2. sandstedt

    sandstedt

    Joined:
    May 24, 2015
    Posts:
    2
    Did you solve this somehow?
     
  3. WhosTheBoss

    WhosTheBoss

    Joined:
    Jan 8, 2013
    Posts:
    44
    I have a similar issue.
    I have 3D objects inside canvases. In the Editor, i can see shadows but when i deploy to mobile phone, there are no shadows
     
  4. WhosTheBoss

    WhosTheBoss

    Joined:
    Jan 8, 2013
    Posts:
    44
    I finally solved it.
    It all has to do with the scaling of Objects.

    Try adjusting the scaling of the 3D and 2D objects. Also, go to Edit>Project Settings>Quality. Search for Shadow distance and try adjusting it up and down to see if you notice any difference.

    Good luck.