Created
November 30, 2017 03:03
-
-
Save jm991/542a9170f5698f744d557f7f725eef5d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class TextureFormatCheck : MonoBehaviour | |
{ | |
public Texture2D tex2D; | |
public Material mat; | |
// Use this for initialization | |
void Start() | |
{ | |
mat = this.GetComponent<MeshRenderer>().material; | |
} | |
// Update is called once per frame | |
void Update() | |
{ | |
if (tex2D != null) | |
{ | |
Texture tex = mat.GetTexture("_BumpMap"); | |
// Debug.Log(tex.); | |
Debug.Log("Format: " + tex2D.format); | |
this.enabled = false; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment