Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
3
Question by Jovy83 · Apr 16, 2015 at 08:19 AM · canvaslayersorting layers

How to make canvas be layered behind my sprite?

I'm working on a 2D game and I want to have my score counter Text object (a child of the canvas) appear behind my obstacle sprites so that it doesn't distract the player too much.

Currently I have already set the Sorting Layer for my obstacle sprites and the Text object. The Text object is on a sorting layer below the obstacle sprites but the Text object still appears on top of the obstacle sprites in-game.

I'm still getting used to this new UI system that Unity has so I'm not sure how to make this work. Anyone know how to fix this issue?

Thanks!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
4

Answer by Hrungdak · Apr 16, 2015 at 08:45 AM

You can set the render mode of the canvas to world space. So the canvas becomes a normal Game object that can be layered.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Jovy83 · Apr 17, 2015 at 01:08 AM 0
Share

Thanks for the answer. When I set the render mode of my canvas to world space, my UI Text disappears. I have tried setting it on a sorting layer that is above all my sprites but I still don't see my Text elements. Any ideas?

avatar image rluks Jovy83 · May 07, 2016 at 04:33 PM 0
Share

Check z-value of the UI element's position

avatar image SilverFang180882 rluks · May 21 at 07:21 AM 0
Share

That doesn't work with mine. Does a World Space canvas need some sort of special camera attached to it? Unity seems to be prompting it in the editor.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Problem with Mask and Canvas (Sort Order) Unity 5 1 Answer

UI masking on nested canvas with overwrite sorting layer. 1 Answer

How can sort layer of canvas overlay to behind of canvas with camera view? 0 Answers

How do I change the sorting layer of a UI image when it is being dragged? 2 Answers

Is there a way to adjust canvas z-ordering while using Alphabetical Sort in the Hierarchy? 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges