public void OnAfterDeserialize()
 {
     for (int i = 0; i < _images.Length; ++i)
     {
         if (_images[i].HasManySprites)
         {
             _images[i] = new ImageInfoMultipleSprites(_images[i]);
         }
     }
 }
 public void OnBeforeSerialize()
 {
     for (int i = 0; i < _images.Length; ++i)
     {
         if (!_images[i].HasManySprites)
         {
             if (_images[i].Renderer == null)
             {
                 continue;
             }
             var multipleSpritesObject = _images[i].Renderer.GetComponent <IMultipleSprites>();
             if (multipleSpritesObject != null)
             {
                 _images[i] = new ImageInfoMultipleSprites(_images[i], multipleSpritesObject);
             }
             else
             {
                 _images[i] = new ImageInfo(_images[i].Renderer, _images[i].OriginalImage, _images[i].CurrentColor);
             }
         }
     }
 }