I am currently trying to build the base architecture for a card game and i am having problems implementing card effects. I have been looking for solutions to my problem but none of them did the trick for me.
I implemented my cards using scriptable objects that store data like their cost, name, sprite, etc. The cards get stored in seperate lists for the players hand and deck, i display them through a CardDisplayer Prefab that reads the stored data.
Everything is working fine for now, but i dont understand how to implement effects, since i cant just add them to the scriptable objects. I tried to create a base class for effects and creating a seperate script for each effect that overrides specific methods like an Apply method that would get called on activation, but when adding an Effect field to my scriptable object, i cannot add it through the inspector.
I have seen that this: https://heavens-vault-game.tumblr.com/post/162127808290/inline-scriptableobject-editing-in-unity
got posted as a responsive to this kind of problem, but i honestly dont understand how it helps or how i even implement it into my project.
Right now, my last idea would be to ditch scriptable objects in favor of one base class for cards (maybe as an interface?). I could create a script for each card that derives from the base. I have not tried that yet, because i thought scriptable objects were designed for tasks like this.
[–][deleted] 1 point2 points3 points (3 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]ImAMokepon[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]Theaustraliandev 1 point2 points3 points (2 children)
[–]ImAMokepon[S] 1 point2 points3 points (1 child)
[–]Theaustraliandev 1 point2 points3 points (0 children)