Search Unity

Changing detail map at runtime

Discussion in 'General Graphics' started by Hacky, Aug 3, 2015.

  1. Hacky

    Hacky

    Joined:
    Mar 22, 2013
    Posts:
    28
    Hi!

    I want to change the detail map of the standard shader at runtime. I use the following line:

    Code (CSharp):
    1. renderer.material.SetTexture("_DetailAlbedoMap", detailMap);
    But I can see the changes only when I unfold the material in the inspector of the object. Is this a bug or did I something wrong?

    Thanks for your help.

    Best regards,
    David
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,297