r/unity_tutorials • • Apr 06 '21

Configure Enemy Attacks with ScriptableObjects to Reduce Prefab Count and Increase Enemy Diversity | AI Series Part 9 | Full Tutorial in Comments

70 Upvotes

3 comments sorted by

2

u/LlamAcademyOfficial Apr 06 '21

Full Tutorial on YouTube

Hey all! Happy #TutorialTuesday! This week we're revisiting ScriptableObjects. Now that we have more variety on how our enemies can attack, we'll be creating an Attack Configuration ScriptableObject that will configure what was implemented last week with the homing projectiles. This moves more to a data-oriented design which is easier to maintain over the prefab-oriented design. As always, full project code is available on GitHub!

If you're getting value from this series, please consider liking and subscribing to help these tutorials reach and add value to even more people! New tutorials every Tuesday, sometimes on other days too.

2

u/tchuckss Apr 07 '21

Scriptable objects are excellent. In my current game, I have enemy configurations, attacks, actions, weapons, items, armor and a whole other bunch of stuff as scriptableobjects that are loaded into prefabs as needed.