Hey guys, I’m completely new to Unity and I couldn’t find an answer to my question anywhere. I want to make an android game and I need player to be able to upload his own face (from gallery or camera) and then i want to take this photo and replace the character head with it. The character can be even stickman and I dont need any animations. Is it possible - if yes, how? Thank you for your answers!
Hi,
To be honest, I doubt the amount of searching you did… Start by splitting your problem into atomic sub-problems. You will not find a connect-the-dots tutorial for every topic you come across in game/software development:
On high level you need to do the following things:
- Get your image to Unity. This requires accessing gallery or camera. Look for information on that topic.
- Then you need to probably process the image somehow, like scale it down, crop it or such. Look into how to process
textures in Unity. Look into GetPixels, SetPixels and other texture-related commands. You will find a lot of information.
If you need fast processing, you might need process your image on GPU, but considering your requirements, it’s not probably necessary (although camera images can be very big.) - Then you need to apply that texture to the object, or use it as a sprite, depending how you are rendering your graphics. There’s also a lot of information available about this.
Great, thank you very much for your time.