ActiveTextureManagement.ActiveTextureManagement.DBGLog C# (CSharp) Method

DBGLog() public static method

public static DBGLog ( String message ) : void
message String
return void
        public static void DBGLog(String message)
        {
            if (DBL_LOG)
            {
                UnityEngine.Debug.Log("ActiveTextureManagement: " + message);
            }
        }

Usage Example

Esempio n. 1
0
        public static void Resize(GameDatabase.TextureInfo texture, int width, int height, bool mipmaps, bool convertToNormalFormat)
        {
            ActiveTextureManagement.DBGLog("Resizing...");
            Texture2D     tex    = texture.texture;
            TextureFormat format = tex.format;

            if (texture.isNormalMap)
            {
                format = TextureFormat.ARGB32;
            }
            else if (format == TextureFormat.DXT1 || format == TextureFormat.RGB24)
            {
                format = TextureFormat.RGB24;
            }
            else
            {
                format = TextureFormat.RGBA32;
            }

            Color32[] pixels = tex.GetPixels32();
            if (convertToNormalFormat)
            {
                ConvertToUnityNormalMap(pixels);
            }

            Color32[] newPixels = ResizePixels(pixels, tex.width, tex.height, width, height);
            tex.Resize(width, height, format, mipmaps);
            tex.SetPixels32(newPixels);
            tex.Apply(mipmaps);
        }
All Usage Examples Of ActiveTextureManagement.ActiveTextureManagement::DBGLog