static public void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths) { List <Texture2D> textures = new List <Texture2D>(); foreach (string str in importedAssets) { Texture2D tx = AssetDatabase.LoadAssetAtPath(str, typeof(Texture2D)) as Texture2D; if (tx != null) { textures.Add(tx); } } if (textures.Count > 0) { for (int i = 0; i < textures.Count; i++) { OTContainer c = OT.ContainerByTexture(textures[i]); if (c != null) { if (c is OTSpriteAtlasImport) { (c as OTSpriteAtlasImport).reloadData = true; (c as OTSpriteAtlasImport).Reset(true); } else { c.Reset(true); } OT.Reset(); } } } }
void _ResetContainer(OTContainer container) { container.Reset(); }