I had no problem at save & load when I used Texture2D variables. Image import setting is Sprite though.
Save done very quickly.
But after I changed to Texture2D variables to Sprite, problem occurs, null reference occur, save execution very slow than before,,,
Are there good way to store image?
Of course not store image is best, but I have class that has image variable... and when it is Sprite type, it become null when game loaded.
Good solution for store image?
Re: Good solution for store image?
Hi there,
As with your previous issue, try deleting your save data to make sure that you're not trying to load Texture2D data using Sprite.
You might also want to check that your Sprite is not null before trying to save it, as this will also cause a NullReferenceException.
If this does not fix your issue, please could you provide me with a simple sample project and some instructions to replicate the error?
All the best,
Joel
As with your previous issue, try deleting your save data to make sure that you're not trying to load Texture2D data using Sprite.
You might also want to check that your Sprite is not null before trying to save it, as this will also cause a NullReferenceException.
If this does not fix your issue, please could you provide me with a simple sample project and some instructions to replicate the error?
All the best,
Joel