Hey guys, wrote a small tutorial showing how one could use scriptable objects to create a pretty flexible buff system. There’s just two required classes, the buff scriptable object to hold the data and a buff logic class that acts as the timer and logic controller. There’s a third ‘BuffableEntity’ component that can be added to game objects that can receive buffs. I have found this method of a buff system to be very easy to use and flexible, especially when creating different buffs that vary only in value or visuals, while the logic remains the same.
It’s a text tutorial, you can read it here, or see the files on github here.
Any comments are appreciated, would love to hear tips on how I can improve this.
My only problem, is that you present every single class in a complete form from the start. This encourages copy-pasting and the tutorial part of the whole thing is gone. I prefer having a sortof build up thing in tutorials, like, what does a buff need? of course, a timer and an initializer, but how do I do the latter? of course, I just return a new TimedBuff, and takes in the gameobject it affects. So let’s create that class and fill it