Impact Effects with Scriptable Objects | Unity Tutorial

Veröffentlicht am: 05 April 2022
auf dem Kanal: LlamAcademy
12,426
382

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).

👩‍💻 As always, all code from this video is available on GitHub: https://github.com/llamacademy/surfac...

🏷️Save 25% on the ultimate C# IDE: JetBrains Rider with code LLAMACADEMY: https://www.jetbrains.com/store/?sect...

🎥 If you want more explanation on how the Click to Shoot was implemented, check out the Bouncing Bullets video:    • Bouncing Bullets with Hitscan Guns | Unity...  

🎥 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 Render...  

🔊 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): https://assetstore.unity.com/packages...

💥Particle Systems, Decals, and Textures came from the Unity Particle Pack (free): https://assetstore.unity.com/packages...

🧡 Believe in LlamAcademy's mission and have received value from the videos? Here's how you can show your support:
🌟 Patreon:   / llamacademy  
🌟 YouTube Member:    / @llamacademy   or click the Join button on any video
📚 Take my Unity ShaderGraph Course:
https://www.gamedev.tv/p/unity-shader...
👕 Get yourself some LlamAcademy merch: https://llamacademy.myspreadshop.com/
💸 Use my Affiliate Link for Humble Bundles https://humblebundleinc.sjv.io/9g4ak4
💸 Publisher Sale! 50% OFF an entire publisher's Assets! Publisher changes weekly! https://assetstore.unity.com/publishe... (affiliate)
💸 Save up to 50% on NEW Assets: https://assetstore.unity.com/?new_sal... (affiliate)

Some links may be affiliate links, which at no additional cost to you, gives me a small portion of the purchase.

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 Thoughts


Auf dieser Seite können Sie das Online-Video Impact Effects with Scriptable Objects | Unity Tutorial mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer LlamAcademy 05 April 2022 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 12,426 Mal angesehen und es wurde von 382 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!