Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
1
Question by Adam D. · Apr 09, 2010 at 06:20 AM · cameragameobjectgizmodepth-buffer

Forcing a GameObject to the highest depth (closest to camera)

I am Instantiating my own gizmo Prefab at runtime, when clicking on a GameObject.

I am using the selected objects transform.position and transform.rotation to place the gizmo in the center of the GameObject.

This is at runtime, not in the Editor. So the built in gizmo functions aren't available.

The Problem:

I would like the Gizmo to appear on top of everything else, but maintaining its proper position in relation to the GameObject.

Basically, what the Unity Editor does with its Gizmos.

Is this doable?

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

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by runevision · Apr 09, 2010 at 11:26 AM

See this question:

Rendering Order

Comment
Add comment · Show 4 · 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 Adam D. · Apr 09, 2010 at 02:31 PM 0
Share

Awesome! That was exactly what I wanted.

avatar image Adam D. · Apr 09, 2010 at 09:15 PM 0
Share

Hmm - Doesn't seem to work. I also tried adding "Queue"="Overlay+1" The gizmo is still "inside" of the objects.

avatar image Adam D. · Apr 09, 2010 at 09:58 PM 0
Share

That worked! I found the issue in my shader...

avatar image Julien-Lynge · Oct 05, 2011 at 09:55 PM 0
Share

I know this is an old question, but what was the issue with your shader that you fixed? I've tried changing the renderQueue and just cannot get it to work at all. Is there something else within the shader that is conflicting with or overriding the renderQueue?

avatar image
-1

Answer by qJake · Apr 09, 2010 at 07:51 AM

I would like the Gizmo to appear on top of everything else, but maintaining its proper position in relation to the GameObject.

I don't understand what you mean by this... you need to be more clear.

Unity treats any gizmos that you draw yourself identically to those it uses internally. Unless you're doing something different (or you want to produce a different result), you shouldn't be having any problems. There's no difference between a gizmo you place, and a gizmo Unity places (by default).

Comment
Add comment · Show 2 · 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 runevision ♦♦ · Apr 09, 2010 at 11:27 AM 0
Share

If you don't understand a posted question, consider stating that in a comment, and not as an answer.

avatar image Adam D. · Apr 09, 2010 at 02:36 PM 0
Share

I edited my answer to be more clear for future readers. This is at runtime, and the unity gizmo functionality is only available 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

1 Person is following this question.

avatar image

Related Questions

Unity3D scene not rendering objects in Game screen 3 Answers

Rotating GameObject Around Player With "Mouse Y" Position 2 Answers

Set Game Object Position to Sides of a Camera 1 Answer

GameObject is in and out camera FOV 1 Answer

Is there a way to write to Deferred Depth from a command buffer in CameraEvent.AfterImageEffects? 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