Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We are updating our Terms of Service for all Unity subscription plans, effective October 13, 2022, to create a more streamlined, user-friendly set of terms. Please review them here: unity.com/legal/terms-of-service.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice
  4. Join us on Thursday, September 29, for a day with Unity's SRP teams here on the forum or on Reddit, and discuss topics around URP, HDRP, and the Scriptable Render Pipeline in general.
    Dismiss Notice

material.shader.name = "" in Unity 5.5

Discussion in 'Scripting' started by MRKane, Jan 15, 2017.

  1. MRKane

    MRKane

    Joined:
    Oct 4, 2012
    Posts:
    54
    Hello all,

    Previously I was using material.shader.name to find the name of shaders assigned to objects retrieved from an asset bundle, and since upgrading to Unity 5.5 (from Unity 5.4) the name of the shader has been returning an empty string where previously it returned the full name of the shader.

    Has anyone else hit this behaviour, know the cause of the change, or even better: know the solution?

    Kindest regards, and thank you for your assistance!
     
unityunity