How to Change a SPRITE Image with Script | Unity C# Tutorial (Updated 2024)

preview_player
Показать описание
Let's learn how to change a sprite image with script using C# and Unity!

~ Contact ~
Рекомендации по теме
Комментарии
Автор

thanks, I watched it a few times over so I could get the concept well enough to add my own things to it. nice, short and straight to the point, thanks

Kyran-MSK
Автор

0:04 Visual upgrade: Do you see the planets do not touching the bottom grey rectangle outline edge? So I think they shouldn't touch the sides as well (left and right) because it looks weird. Try to move left and right collider to inside and it should looks better 😊
Hopefully I am right 😁

SharyGameDev
Автор

do you have a tutorial about making a whack a mole game in 3d with unity just like you did in a game jam called ghost rodeo?

camerontully
Автор

how can i add this to a button, bcs there normally is no sprite renderer on it?

PixelNoob
Автор

Hey.. can anyone help me? I've been strugling with something that I don't know if it is even possible in Unity. I want to find a library (or a builtin function) that bends the sprite sideways. Just like you do in photoshop when you apply free tranform and hold Ctrl.

I want to make those 90´s parallax effect in a single image for the floor. This effect is reached by bending the sprite and deforming it moving the top sideways. I have tried shaders, sprite shape but those just won't do the job. All I need is a way to made the Transform Rect bend.

Before:


| |


After:


/ /


Does anyone know how to do this in unity?

Mike.M.Tie
Автор

Q: What if I want to add an a "if" Stement in to the code?

iop
Автор

It didn't work for me for some reason.

raphaelchan
welcome to shbcf.ru