///////////////////////////////////////////////////////////////////////////////
// functions
///////////////////////////////////////////////////////////////////////////////
// ------------------------------------------------------------------
// Desc:
// ------------------------------------------------------------------
public static void UpdateAtlas( exSprite _sprite,
exAtlasDB.ElementInfo _elInfo )
{
// get atlas and index from textureGUID
if ( _elInfo != null ) {
if ( _elInfo.guidAtlas != exEditorHelper.AssetToGUID(_sprite.atlas) ||
_elInfo.indexInAtlas != _sprite.index )
{
_sprite.SetSprite( exEditorHelper.LoadAssetFromGUID<exAtlas>(_elInfo.guidAtlas),
_elInfo.indexInAtlas );
}
}
else {
_sprite.Clear();
}
}