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
0
Question by oliver-jones · Apr 15, 2014 at 04:07 PM · editoriosrendererline

LineRenderer - Not Showing within Game

Hello,

I have a line renderer that IS showing within my Unity Editor window, but NOT in my Unity Game window. Not really sure why?

  • The line renderer is using the Toon Basic shader (although, even if I use a simple shader - still doesn't show).

  • Makes no difference when I change the width, or manually change the Vector position of it.

  • My camera is an Orthographic.

  • It's compiled for iOS

Not sure what the problem is at all - so I'm just naming anything it could have to do with it.

--- Update ---

Okay, so when I play the game with my line renderers on, it doesn't show. But when I move my game camera slightly within the editor, the camera suddenly 'sees' the lines and then it works as expected. Might be a bug in the actual editor?

I'll build to iPhone and see if it occurs there.

--- Update 2 ---

Nop! Doesn't show in the build either... Only in the editor - or when I move the camera a little bit in the editor; it will then show in the game window, not sure if this is the same case for iOS.

Comment
Add comment · Show 3
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 Benproductions1 · Apr 16, 2014 at 11:46 AM 0
Share

Do you have occlusion culling enabled?

avatar image EBR · Apr 16, 2014 at 12:01 PM 0
Share

Is it tagged EditorOnly?

avatar image Benproductions1 · Apr 16, 2014 at 12:03 PM 0
Share

@EBR obviously not, since it shows when the camera moves.

2 Replies

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

Answer by ilkin · Apr 17, 2014 at 09:07 PM

I had the same problem today. I was trying to draw a line between my gameobjects. When I changed the position.z of my game objects from 0 to 1 lines became visible on both the editor and the game view. Hope this helps.

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 Good_Venson · Aug 18, 2016 at 10:18 PM 0
Share

Thanks, this fixed my problem as well. After a bit of testing, I came to the conclusion that it might have something to do with the billboard effect that the line renderer has. Perhaps, even though the camera is in ortho mode, and the billboarding should always be facing straight, there is some bug that causes that to break when the camera and the line renderer have the same value on the z axis.

avatar image
2

Answer by TheGameLearner · Nov 22, 2018 at 04:45 AM

It's late but maybe It will Help someone. If your Camera 'sees' the line renderer after moving, then it means that the line started from the center of the camera. In essence, you are looking at a single-sided polygon(line renderer). Now it can turn to 'face' the camera while maintaining a starting and end position, by rotating about its line axis to make itself visible to the camera. But when you are at an end point of the renderer, the single-sided polygon has no rotation that will enable the camera to see it. My suggestion for anyone facing this issue, make the line renderer start from a point that is a little below the main camera.

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

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

25 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

Related Questions

Trouble downloading iOS Platform editor support 0 Answers

Highest Unity version that's compatible with ARKit Plugin (deprecated) for app store publication 0 Answers

Printing Distance b/w two points using line renderer and Raycast 1 Answer

Why are the physics different between the editor and device (iOS)? 1 Answer

where can I store txt files in the editor that I'm going to access in ios 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