Is it possible for players to change images in a game?

Ok lets say in your game you have a picture in a frame on a wall, now I’m wondering if it is possible to have players change that image to whatever they like?
Can it be done for 100’s of pictures in frames?
And can they save that so the next time the game is played all of the pictures will be the ones that they put into the frames?

A big question I know but I’m curious :slight_smile:

It should be possible. Let’s say when a player clicks on a frame that you want to change the image on, you could easily change the texture on that object, whatever it may be, by using:

gameObject.renderer.material.mainTexture = textureYouWantToActivate;

Having the textures stored in an array and initialized before scene load would be the best way to go about handling 100’s of pictures, but you also have to remember that textures are usually the items that take up the most memory in a game, so you also have to think of the feasibility of this to begin with. This all depends on what you’re trying to accomplish of course, what sort of pictures they are, and what your target platform is going to be.

The built in PlayerPrefs of Unity holds meta data for you, but you can only save keys that contain floats, ints, and strings, so most likely you will have to devise a system that holds the array data of pictures that the user set into a .txt log file for you to load using Resources.Load, and parsing that data once the game has restarted.

It’s definitely not a hard task, but not an entirely easy one either.