- Home /
Question by
00danis00 · Dec 09, 2017 at 07:36 PM ·
scripting problemcollider
How to use Scriptable Objects on Prefabs correctly
Let's say this is the scriptable object template for a normal spell:
[CreateAssetMenu(menuName = "Spell")]
public class Spell: ScriptableObject
{
public string spellName;
public Sprite spellIcon;
public int damage;
}
How do I manage to instantiate them and use different methods when colliding with enemies (assuming some of the spells are triggers too), since there are spells that act like Projectiles, Area of Effect spell etc... I would have to cover multiple situations.
Comment
Your answer
Follow this Question
Related Questions
Change Material depending on Collider position? 2 Answers
Why when i move the player object through the door the ontriggerenter/exit event are not fire ? 2 Answers
How to change between scripts on trigger? 2 Answers
Physics2D.OverlapCircleAll and method call cause a huge drop in animation frames 1 Answer