Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

How To know if ShaderUtil.GetPropertyType is a Texture2D

$
0
0
Hi guys, so I have this code:
Code (csharp):
  1.  
  2.     public List<Texture> GetTextures(Material mat) {
  3.              List<Texture> list = new List<Texture>();
  4.              int count = ShaderUtil.GetPropertyCount(mat.shader);
  5.              for(var i = 0; i < count; i++) {
  6.                  if(ShaderUtil.GetPropertyType(mat.shader, i) == ShaderUtil.ShaderPropertyType.TexEnv) {
  7.                      //if the texture is not null then works, but if its null, how do I know if its a Texture2D this property type?...
How To know if ShaderUtil.GetPropertyType is a Texture2D

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>