DefaultColoredTexture.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using UnityEngine;
  2. using System.Collections;
  3. namespace LunarCatsStudio.SuperCombiner
  4. {
  5. /// <summary>
  6. /// Returns the default color for each texture property
  7. /// </summary>
  8. public class DefaultColoredTexture
  9. {
  10. public static Color GetDefaultTextureColor(string textureProperty)
  11. {
  12. if (textureProperty.Equals("_BumpMap"))
  13. {
  14. return new Color(0.5f, 0.5f, 1f);
  15. }
  16. if (textureProperty.Equals("_MetallicGlossMap"))
  17. {
  18. return new Color(0f, 0f, 0f, 1f);
  19. }
  20. if (textureProperty.Equals("_ParallaxMap"))
  21. {
  22. return new Color(0f, 0f, 0f, 0f);
  23. }
  24. if (textureProperty.Equals("_OcclusionMap"))
  25. {
  26. return new Color(1f, 1f, 1f, 1f);
  27. }
  28. if (textureProperty.Equals("_EmissionMap"))
  29. {
  30. return new Color(0f, 0f, 0f, 0f);
  31. }
  32. if (textureProperty.Equals("_DetailMask"))
  33. {
  34. return new Color(0f, 0f, 0f, 0f);
  35. }
  36. return Color.white;
  37. }
  38. }
  39. }