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 Detinator10 · Jun 21, 2014 at 12:35 AM · gameobjectspritespriterenderer

Why do my GameObjects have a flickering line above them?

I'm making a 2d platformer in Unity and my ground objects have a SpriteRenderer component that renders an image of some grass. However the actual grass is at the bottom of the .png which it is part of so more than half of the GameObject is clear. However, at the top of the GameObject there is a flickering green line. Does anyone know what this is and/or how to stop it?

Comment
Add comment · Show 1
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 robertbu · Jun 21, 2014 at 12:37 AM 0
Share

Any chance there is a thin line of pixels in your sprite texture that don't have 0.0 for the Color.a? You should be able to enlarge and sample the pixels in Photoshop to test.

2 Replies

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

Answer by CanisLupus · Jun 25, 2014 at 07:20 PM

Assuming you don't want the grass texture to repeat inside the object, try changing the wrap mode of your texture from "Repeat" to "Clamp" in its import settings. This problem has happened to me way too many times in Unity and this is generally the solution. The bottom line of pixels sometimes "bleeds" to the top when in repeating mode.

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 Detinator10 · Jun 27, 2014 at 12:49 AM 0
Share

I had the picture's import type set to sprite and now that I changed it to texture to change the wrap mode, I can't render them with a spriterenderer. How do I render textures?

avatar image CanisLupus · Jun 28, 2014 at 09:52 PM 0
Share

You should be able to keep using your picture in sprite mode if you select the Texture Type as "Advanced" ins$$anonymous$$d of "Texture". In Advanced, you can choose sprite mode AND wrap mode.

If you want to use the picture as a texture, you must add it to a material and render it with a $$anonymous$$esh Renderer. For an example: in the menu select GameObject -> Create Other -> Quad. The Quad comes with a $$anonymous$$esh Renderer. If you drag a texture over the Quad object, Unity will apply that texture to the object. Now change the Quad's material (actually, its shader) to Unlit/Transparent. The "Diffuse" material used by default in Quads is only adequate when you have lights in the scene, and I suppose you want a clear 2D look similar to what Sprite Renderer provides by default ("Sprites-Default").

avatar image
0

Answer by Detinator10 · Jun 25, 2014 at 05:56 PM

I didn't figure out what the line was about. But, to fix it I made the images really tall so the top(including the clear space) was off the screen. Now you can't see the green lines because they're off screen.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Show gameobject as part of UI 1 Answer

Unity streching sprite gameobject to fit two positions. 1 Answer

SpriteRenderer draw only part of the sprite? 1 Answer

How to deal with multiple sprites on a single object without resorting to creating multiple gameobjects 0 Answers

UI Button Sizing unit 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