HOW TO CHANGE A SPRITE IMAGE THROUGH SCRIPT IN UNITY | Unity Tutorial

Опубликовано: 22 Октябрь 2024
на канале: BAM GAMES & APPS - Unity Tutorials
33
1

HOW TO CHANGE A SPRITE IMAGE THROUGH SCRIPT IN UNITY | Unity Tutorial

In this NEW Unity tutorial, we are going to learn how to change the sprite assigned to an image directly from the c# script in Unity.

To do this, we are going to configure a scene in the Unity UI in which the player will choose the skin they like the most to play with. Each time the user clicks on a different skin, the player's preview will update with the corresponding Sprite.

If you want to save the user's preference you can use this Unity tutorial:

✅ HOW TO SAVE GAME DATA IN UNITY WITH PLAYERPREFS - BASIC SAVING AND LOADING METHOD
   • 📩 HOW TO SAVE GAME DATA IN UNITY WITH...  

I'll explain in detail how to do this and show you all the tips and tricks I know in Unity!!!

Have a nice day Unity developer!

❗️KEEP LEARNING❗️
   • Unity Tutorials - Free Course