static void OnUndoRedo()
{
foreach (GameObject go in Selection.gameObjects)
{
tk2dSpriteFromTexture sft = go.GetComponent <tk2dSpriteFromTexture>();
tk2dBaseSprite spr = go.GetComponent <tk2dBaseSprite>();
tk2dTextMesh tm = go.GetComponent <tk2dTextMesh>();
tk2dTileMap tilemap = go.GetComponent <tk2dTileMap>();
if (sft != null)
{
sft.ForceBuild();
}
else if (spr != null)
{
spr.ForceBuild();
}
else if (tm != null)
{
tm.ForceBuild();
}
else if (tilemap != null)
{
tilemap.ForceBuild();
}
}
}