Files
adriadri6972 d3d9c5f833 upload project
2025-07-31 15:21:08 +02:00

24 lines
761 B
C#

using System.Text;
namespace UnityEngine.XR.ARFoundation.InternalUtils
{
static class TextureExtensions
{
internal static string ToDebugString(this Texture texture)
{
if (texture == null)
return "null";
var sb = new StringBuilder();
sb.AppendLine("{");
sb.AppendLine($" width: {texture.width},");
sb.AppendLine($" height: {texture.height},");
sb.AppendLine($" dimension: {texture.dimension},");
sb.AppendLine($" graphicsFormat: {texture.graphicsFormat.ToString()},");
sb.AppendLine($" nativeTexturePtr: {texture.GetNativeTexturePtr()}");
sb.Append("}");
return sb.ToString();
}
}
}