Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
2
Question by MasterLG · Jan 24, 2013 at 07:14 PM · graphicsoutlinedrawing

How to draw outlines around objects

The easiest example I can think of is Blender. When you select an object in Object mode, it draws an orange outline around it.

This effect seems like it would be useful for selecting an object.

How would I do or emulate that effect in Unity?

Comment
Add comment · Show 5
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 Vonni · Jan 24, 2013 at 08:00 PM 0
Share

Never done it, but I would imagine rendering the objebt slightly scaled and with an unlit orange flat shader and then rendering the normal object again over it would do the trick. But not a perfect solution :/

avatar image iwaldrop · Jan 24, 2013 at 08:22 PM -1
Share

Blender is open source. You could look at their source and adapt it to Unity Gizmos. Just a thought.

avatar image AlucardJay · Jan 24, 2013 at 10:34 PM -1
Share

There is this shader : http://wiki.unity3d.com/index.php/Silhouette-Outlined_Diffuse

avatar image MasterLG · Jan 25, 2013 at 01:03 AM 0
Share

Awesome. That script looks like it does exactly what I'm looking for. I wish this was an answer so I could mark this question as answered.

However, now I have one issue that I haven't been able to find the solution to - how do I use these scripts?

avatar image Eric5h5 · Jan 25, 2013 at 01:43 AM -1
Share

They're not scripts, they're shaders. See the Unity docs about using shaders.

1 Reply

· Add your reply
  • Sort: 
avatar image
2

Answer by Cinematronic · Jan 24, 2013 at 10:08 PM

Make a second model a little bit bigger and set it as a child of the original. Change the material of it and add color. Set collider off. Use a script to make it appear and disappear on mouse over or use triggers or whatever.

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 oaksketch · Aug 01, 2015 at 10:25 PM 0
Share

Thanks! Worked for me!

avatar image smiley-HD · Apr 05, 2017 at 07:12 AM 0
Share

Thanks, this works great!

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

16 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

Related Questions

How Do I Make The "Solar Outline" Effect? 0 Answers

Graphics.DrawMesh not working 2 Answers

How can I draw an array of data (640x480) very fast ? 5 Answers

Drawing bullets using GUITextures 1 Answer

Invert background in shadergraph 0 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