Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 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
0
Question by nopropsneeded · Oct 04, 2019 at 09:16 PM · uicanvasui imagesorting layerssorting order

UI object drawing order is different between Unity Editor and Standalone version

alt text alt text I want to draw the objects in the canvas in the desired order.

I placed Background (Black Image) and CardPlace (transparent image) in the canvas. I add Card objects in CardPlace while the game is running.

The render mode of the canvas is "world space", the sorting layer is set to "UI", and the sorting layer of the Card object is set to a layer above "UI".

Sorting layers are not set for Background and CardPlace.

CardPlace and the Cards in it should always be drawn above the Background image.

When I run the game in the Unity Editor, it draws as I want. But when I build it for mac and run it standalone, a black translucent Background image is drawn on top.

How can I draw UI objects in the canvas as desired? Setting sorting group for CardPlace didn't work.

Thank you.

スクリーンショット-2019-10-04-213216のコヒー.png (415.5 kB)
スクリーンショット-2019-10-04-213329のコヒー.png (508.1 kB)
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
1

Answer by tormentoarmagedoom · Oct 04, 2019 at 09:46 PM

Woa Magic the gathering. Are you doing some unofficial game or what :D:D ??

Now, about your problem, Do you have any script doing something in the canvas? What we see in your Editor, is redened during runtime right (when is "play"? is not like that when is "stop".

Once, i had a problem because some scripts was not executing in the same order in editor and in stanalone. (some Start functions where called in diferent order) And get wird things like that.

I recommend you, just to be sure is not this, use the Script Execution Order settings (menu: Edit > Project Settings, then select the Script Execution Order__ category) and define the exact order you need to be sure everything is rendered int he correct way.

Another thing you can chek is the order in layer of all that elements, if they are in diferent layers you will not ahve strange things:

https://unity3d.com/es/learn/tutorials/topics/2d-game-creation/sorting-layers

Good luck!

Comment
Add comment · Show 1 · 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 nopropsneeded · Oct 05, 2019 at 02:07 PM 0
Share

Thank you for your reply. I'm making an unofficial $$anonymous$$TG game for personal use.

Background Image and Card object already have different sorting layers. Card object has a sorting group. So Card objects should always be displayed above the Background, but when I run standalone, it will appear below. After all, I didn't understand the cause of the problem, but when I changed the order in layer of the Card object from 0 to 1, it was displayed correctly.

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

198 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

UI Canvas Image parented to main camera only moves in x and z 0 Answers

5.3 : Display particles over an Image component 1 Answer

Issues rotating a UI image while the canvas is parented to the Main Camera 0 Answers

Canvas Screen Space Issue 1 Answer

Images order inside Canvas 1 Answer


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