void TrySwapping( ref Texture _a, ref Texture _b, TextureFileInfo.USAGE _expectedUsageForA, TextureFileInfo.USAGE _expectedUsageForB, ref int _swappedSlotsCount )
{
if ( _a == null || _a.m_textureFileInfo == null )
return;
if ( _b == null || _b.m_textureFileInfo == null )
return;
if ( _a.m_textureFileInfo.m_usage == _expectedUsageForB && _b.m_textureFileInfo.m_usage == _expectedUsageForA ) {
// Switch!
Texture temp = _a;
_a = _b;
_b = temp;
_swappedSlotsCount++;
}
}