Under com.unity.memprofiler.../Editor/UI, edit SelectedItemDetailsForTypesAndObjects.cs
Add the following usings:
using UnityEngine.Rendering;
using UnityEngine.Experimental.Rendering;
and further down at the end of the "internal void HandleUnityObjectDetails(CachedSnapshot snapshot, MemorySampleSelection memorySampleSelection, UnifiedUnityObjectInfo selectedUnityObject)" near line 200, add:
if(selectedUnityObject.ManagedTypeName.Contains("Texture") ||
selectedUnityObject.NativeTypeName.Contains("Texture"))
{
EditorAssetFinderUtility.Findings findings = EditorAssetFinderUtility.FindObject(snapshot, selectedUnityObject);
if(findings.FailReason == EditorAssetFinderUtility.SearchFailReason.Found && (findings.FoundObject is Texture2D))
{
Texture t = findings.PreviewImage;
string s = string.Format("Format: {0}, IsCompressed: {1}, RuntimeCreated: {2}", t.graphicsFormat.ToString(), GraphicsFormatUtility.IsCompressedFormat(t.graphicsFormat), selectedUnityObject.IsRuntimeCreated);
m_UI.AddDynamicElement("Texture Format", s);
}
else if(findings.FailReason == EditorAssetFinderUtility.SearchFailReason.NotFound && selectedUnityObject.IsRuntimeCreated)
{//RenderTextures
}
}