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 samshosho · Sep 30, 2013 at 01:52 AM · problem during runtimetransparent shaderchanging shader

changing the shader of a material during runtime to transparent or particles additive does not work

I have been having this problem since the update to 4.2.1, during runtime when i try to change the current shader on a material that's applied to a mesh object, from it's current shader to anything that's transparent, it does not work and it gives a purple color instead, a purple color as in the material is missing! even thou it works just fine in the editor, once transferred to the iPhone, the problem shows.

I have tried to change the shader to a transparent/specular or transparent/diffuse , also tried particles/additive (soft) ,, same problem. I have tried to build for IOS 4.3, 5.0 and 6.0, as a target device, still no go.

You know, how when you have a mesh with a material with a missing texture! you know the purple color that you get when that happens! that's exactly what shows after changing the shader during the runtime, but the mesh and the material on it, have the texture just fine and it works just fine in the editor, no problem. So all good, go and transfer to the iphone and the problem shows, it's driving me crazy !!!!

Didn't have this problem in 4.1.5, the problem showed aftering updating to 4.2.1.

Any ideas ?

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 paandittya · Oct 29, 2015 at 01:12 PM 0
Share

@samshosho - Hey. I am having this same problem. Did you find any solution for this one?

1 Reply

· Add your reply
  • Sort: 
avatar image
2

Answer by Bonfire-Boy · Oct 29, 2015 at 02:13 PM

Check that the shader is included in the build.

If a shader is only being applied through code, rather than being used in a material that's used in a scene or prefab, then you need to add it to the "Always Included Shaders" list (see Edit Menu/Project Settings/Graphics).

If you don't, then things will happen the way you're experiencing them. It'll be fine in the editor, but on a device it won't be able to find the shader and you'll get "placeholder pink".

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

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

Transparent Glass for Free Version Of Unity? 1 Answer

LightingLambert': cannot implicitly convert from 'half3' to 'struct UnityGI' 0 Answers

Rendering object that is partially obscured by another 1 Answer

Standard Assets for Unity 4.6 0 Answers

iOS - Server response is differ from os to os 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