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 /
This question was closed Mar 31, 2014 at 04:15 PM by MousePods for the following reason:

Figured out the solution!

avatar image
0
Question by MousePods · Mar 30, 2014 at 04:23 AM · editorbuild-errortransparencycube

Transparency not working in build

I have two cubes, one is 0.2 bigger then the other cube. They are in the same position.

They are both using vertex color shader.

 Shader "VertexColor" {
 Properties {
     _Color ("Main Color", Color) = (1,1,1,1)
 }
 
 SubShader {
 
        Tags {Queue=Transparent}
        Blend SrcAlpha OneMinusSrcAlpha 
     
     
     Pass 
     {
         ColorMaterial Emission
     }
 }
 
 Fallback "VertexLit", 1
 }


In the editor, everything works fine! The cube in the center and outer cube both have the same percentage of alpha and color and I get this nice outline effect.

alt text

When I build, you cannot see the inner cube! I offset the outer cube to see what was happening. If I am above the two cubes, I can see part of the inner cube.

alt text

When I go below the cube, I can see the entire inner cube!

alt text

I cannot see why it works in the editor, but not in the build. (Most annoying glitches every!)

Thanks for any help!!

EDIT: The solution was to simply move the cube up by 0.1f. Thanks for everyone's help!

Comment
Add comment · Show 4
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 Owen-Reynolds · Mar 30, 2014 at 02:45 PM 0
Share

Build on which platform?

avatar image MousePods · Mar 30, 2014 at 04:14 PM 0
Share

Web and Desktop (Windows)

avatar image supernat · Mar 30, 2014 at 09:21 PM 0
Share

Unlikely an annoying glitch, more likely an expected result of having two objects close together. If you mean it looks different in the Scene view than the Game view, it's probably due to depth buffer precision if you're using a perspective camera. It's likely still a depth precision problem if you see the difference between the Game window and a full on build if the built version is full screen. In either case, reducing the far clip plane and increasing the near clip plane could help.

If using an orthographic camera, you probably shouldn't be seeing this. What and when are you seeing this?

avatar image MousePods · Mar 31, 2014 at 01:23 PM 0
Share

It works perfect in the game/scene view ONLY when both cubes are on top of each other. If I offset the outer cube, (like the 2nd image in the OP) then it will clip the inner cube as shown in my OP in both build and editor.

I am using a perspective camera. The clip plane isn't the issue (I have near as 0.01).

It doesn't work in fullscreen.

Yes, orthographic camera fixes it.

The issue happens in the web and windows build (only ones iv tested so far). But like I said, if I offset the outer cube, it will also have the issue in the editor.

Thanks!

0 Replies

  • Sort: 

Follow this Question

Answers Answers and Comments

22 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

Related Questions

Problems with Builds 1 Answer

Build Error 1 Answer

Game works fine in editor, but build fails with 59 error in the console 2 Answers

Input mapping in project setting lost when build 2 Answers

C++ Error After Automated Build 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