Unity 5: Fade Gameobjects with transparent shader and iTween

preview_player
Показать описание
In this tutorial I showed how to fade in and out GameObjects with a transparent shader / material using iTween. Therefore I switch the rendering mode of the shader from opaque to transparent in a C# script.

See my social profiles here
Рекомендации по теме
Комментарии
Автор

Great add-on and script! This can be used to solve a nicely look removal of crushed objects and slayed enemies too. Thanks a lot!

DimensionDoorTeam
Автор

Still wish you had finished this game. But I also have a lot of prototype games I never finished. Kudos!

leedavis
Автор

great tutorial. loving it. i just happened to be after the same exact effect, and was facing some trouble with the Shader-Material based code.
well, i guess i got to learn shader programming sometime, but for now thanks for your tutorial, it was helpful. to get things working to say the least.

motasemzakarneh
Автор

Transparent is when you want to change the opacity per-pixel. In your case the transparency of the whole object is the same, so fade is much better and more performant. However, both techniques have issues with the zbuffer/zordering because Unity didn't write a complete shader.

OverunityStudios
Автор

Great material!
How did you get the shadow to fade with the material?
My shadows just pop...

MrJotaFelipe
Автор

dang bro that was quick! thank you so much for this tutorial. this is AMAZING!!! now i could implement this feature in my own game! you're the best!

pstuddy
Автор

Hi Jayanam, great tutorial! It isn't exactly what I was searching for, I thought I could modify code for my purpose but didn't manage to do so. May I ask you, if it is possible, to make a tutorial about fading in and out of an GameObject by clicking on buttons. I was trying with some changes with while loop but couldn't manage to change alpha value in any way.

djordjearsic
Автор

Holy *^&** it took some time but I got the bugger working! Though all I did in the end was copy paste from your Patreon text file, save it to the iTween folder with the same name you gave yours, add the script to my roof and link the roof to the script, then add a box collider to my roof and make it a trigger! I guess the box collider should've been obvious but for anyone else who's a dumbass like myself, that's all you have to do that isn't mentioned in the tutorial! Thanks for the script dude, I've subbed and will send a few bucks your way when I get the chance!

IAmKlagg
Автор

Hello thx for this very good video but I'm sorry but I couldn't understand for" Implement you logic here if it is your player that is the collider "no matter what the terms of my scripts are, nothing works, please help me

JelArt
Автор

Hello. Thanks for the helpful tutorial. Sorry, I ran into a problem. I ask you to help. I didn't get it about "ICharacter". What it is? Unity won't work because I have no this "icharacter". Unfortunately, you didn't explain this in your video. Can you tell us about this? Otherwise, the script has no work...

miragercm
Автор

Material doesn't have a color property '_Color'

(at
iTween:GenerateTargets() (at
iTween:TweenStart() (at
(at
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

cfactorygames
Автор

Hi Jay, do you perhaps have a tutorial on how you made the mini map?

StormchaserZA
Автор

Nice work, but, have a form to optimize this? This cause minimous lag when i enter in collider if have more one colliders to fade objects, for example, i have 10 walls, and make it for 10 walls, but i walk background of walls, cause minimun lag to make fade :/

Have other form to make this? Or optmize this?

zotinfo
Автор

Do i need any of that script if i just use that fade under the materials there and set it to a animation clip instead of a trigger?

nkmasteroriginal
Автор

when play in editor it works but when i build the game in build setting it doesnt work please help me

karlmarquez
Автор

Man, your visual is great! Can u share the textures and normal maps for the wood and rocks? Or maybe make a tutorial showing how to create this?
Serious... its really cool style!

desh
Автор

Would this mean every single roof in the level would need a separate material?

MrBalinSuperTV
Автор

Do you did this cursor at character bottom using projector or light cookie?

cfactorygames
Автор

I have a question i dont understand what is all of those ICharacter and CharacterManager coming from

Virgsen
Автор

Hi, i have a problem with your tutorial, i can see something is changing (like when I select "Transparent" in the editor) but the alpha is not apply, any idea ?
I saw some post about the way unity3d loads shader. I tried to create a "Shader Varient collection" with a "Standard" shader and some varients and add it to the preload shader in Graphic options but the problem is still the same, maybe I don't add the good varient to the standard shader. If you have any idea :) Thanks :)

Morph_SC