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
7
Question by mike002 1 · Mar 26, 2010 at 04:39 PM · 2dlinesceneviewgizmo

Draw a 2D line in Screen space in the scene editor

Hi there,

I was just wondering how I could draw a simple 2D line, in screen space in the scene view? Much like a gizmo but 2d. Is this possible?

Many thanks, Mike

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

3 Replies

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

Answer by VR Man · May 17, 2010 at 05:19 PM

Also if you look at the FPS Tutorial that someone wrote at Unity (it's a great tutorial actually, I highly recommend it if you haven't already checked it out...). Anyhow, in that example and I think I saw it somewhere else in their stuff too, but they make a 'Waypoint' class. If you fly around in the project you'll notice some little yellow 'W's' in the scene near the big bot chars. If you click on one of those they have a script attached to them that does similar line drawing. You need to tell the waypoint to update it's connections to the other nearby waypoints, and once you've done that (right click menu on the 'w's' props I think) the red lines will show up in 3D space, connecting any nearby waypoints that can see each other - it does tests with raycasts to make sure the waypoints can see one another, pretty decent design.

Hope that helps too, best regards, -=VRMan3D.com=-

Comment
Add comment · 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
0

Answer by Nicolaj Schweitz · May 20, 2010 at 07:36 AM

My bet is that you are looking for something like Gizmo.DrawLine or DrawGizmo.

Once you got that one, you can start playing with values from other objects, like e.g. the scene camera functions and the objects you want gizmified.

Comment
Add comment · 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
-1

Answer by invicticide · May 07, 2010 at 01:44 PM

Check this out: http://www.unifycommunity.com/wiki/index.php?title=DrawLine

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 as87dgs6asg0a · Sep 15, 2020 at 05:35 PM 0
Share

I can't down-vote this because of the stupid 100 point rule. This link DOES NOT take you to anything even remotely related to DrawLine.

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

2 People are following this question.

avatar image avatar image

Related Questions

How to show all collider info in window sceneview 0 Answers

Problem in adaptation code vector3 for vector2 0 Answers

Drawing lines between two touch positions? 4 Answers

How to create a 2D line between a Game Object and the mouse? 0 Answers

Confusion with Gizmo Matrix when using Gizmo Cube 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