コード例 #1
0
ファイル: Texture.cs プロジェクト: Achay009/UnityCsReference
 internal bool ValidateFormat(GraphicsFormat format, FormatUsage usage)
 {
     if (SystemInfo.IsFormatSupported(format, usage))
     {
         return(true);
     }
     else
     {
         Debug.LogError(String.Format("Texture creation failed. '{0}' is not supported for {1} usage on this platform. Use 'SystemInfo.IsFormatSupported' C# API to check format support.", format.ToString(), usage.ToString()), this);
         return(false);
     }
 }
コード例 #2
0
        internal bool ValidateFormat(GraphicsFormat format, FormatUsage usage)
        {
            bool flag = SystemInfo.IsFormatSupported(format, usage);
            bool result;

            if (flag)
            {
                result = true;
            }
            else
            {
                Debug.LogError(string.Format("Texture creation failed. '{0}' is not supported for {1} usage on this platform. Use 'SystemInfo.IsFormatSupported' C# API to check format support.", format.ToString(), usage.ToString()), this);
                result = false;
            }
            return(result);
        }