Impact Effects with Scriptable Objects | Unity Tutorial
9 هزار بار بازدید -
2 سال پیش
-
A common need in video
A common need in video games, to increase immersion of the player, is to add some effect when an impact is made. Using this system whenever an impact is made by any arbitrary action in your game, you can simply call SurfaceManager.Instance.HandleImpact() and this system will utilize Scriptable Objects to determine which effects to play. This allows you to have a highly configuration-driven surface management system where you can reuse effects across different impacts when that makes sense, and easily add/change effects when you want a unique effect!
This week is a little more advanced than I typically do. You can learn how to implement a surface management system that centralizes the control of impacts into a single script that is completely configuration driven (via ScriptableObjects). You'll learn how you can use it to create new Surfaces, Impact Types, and even extend more SurfaceEffects than just SpawnObjectEffect and PlayAudioEffect (that's all that's included in this video).
💸 Ongoing sales 💸
⚫ See all active asset sales on the Asset Store: assetstore.unity.com/?on_sale=true&orderBy=0&rows=…
⚫ Save 25% off your first Asset Store Order: prf.hn/click/camref:1101l9QvC/creativeref:1011l783…
⚫ Save up to 50% on NEW Assets: assetstore.unity.com/?new_sale=true&orderBy=1&aid=…
👩💻 As always, all code from this video is available on GitHub: github.com/llamacademy/surface-manager
❤ Believe in LlamAcademy's mission and have received value from the videos? Become a Patreon Supporter or YouTube Member:
⚫ Patreon: www.patreon.com/llamacademy
⚫ YouTube Member: youtube.com/channel/UCnWm6pMD38R1E2vCAByGb6w/join or click the Join button on any video
🎥 If you want more explanation on how the Click to Shoot was implemented, check out the Bouncing Bullets video: • Bouncing Bullets with Hitscan Guns | ...
🎥 For a more detailed explanation and walkthrough on how to get the active textures on a terrain check out this video: • Get Textures Active on a Terrain or R...
🔊 Gun and impact sound effects in this video came from the Universal Sound Effects asset, which has over 1,000 reviews and a 5 star rating on the asset store (Affiliate link): assetstore.unity.com/packages/audio/sound-fx/unive…
💥Particle Systems, Decals, and Textures came from the Unity Particle Pack (free): assetstore.unity.com/packages/essentials/tutorial-…
----
Most tutorials come from knowledge gained making survival.llama.software/ Llama Survival - a top-down zombie survival shooter for Android and iOS.
I also have some Unity Assets (affiliate link): assetstore.unity.com/publishers/22409?_aid=1101l9Q…
Some links may be affiliate links, which at no additional cost to you, gives me a small portion of the purchase.
#unitytutorial #tutorialtuesday #gamedev #tutorial #unity #llamacademy #gamedevelopment
Chapters:
00:00 System Overview
03:09 Review Demo Scene
04:32 How to Integrate the Surface Manager - SimpleClickToShoot
06:04 Surface Manager Introduction
06:18 SurfaceType.cs
06:34 Surface Scriptable Object
06:50 Impact Type Scriptable Object
07:22 Surface Effect Scriptable Object
07:51 Spawn Object Effect Scriptable Object
08:13 Play Audio Effect Scriptable Object
08:47 Surface Manager Overview
12:46 Create a New Surface with Effects
15:57 Demo
16:30 Final
2 سال پیش
در تاریخ 1401/01/16 منتشر شده
است.
9,016
بـار بازدید شده