So im making a base for an RPG. I making a a sort of spell system where you choose to use spells and attacks. Ive made a class and made to classes that inherited from the first. One for magic attack and the other for physical attacks.
The thing is when i make an instance of the scriptable object and try to initialize a list with it i get the erroe
Type connot be found: MagicDamege. Containing file and class name must match.
I was wondering if anyone knows what i did wrong please?
Attacks file
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public abstract class Attacks : ScriptableObject
{
public string name;
public bool targetPartyMember;
public bool targetEnemy;
public string details;
public int cost;
}
[CreateAssetMenu(menuName = "Attacks/MagicAttack")]
public class MagicDamege : Attacks
{
public string element;
public float damageMultiplyer = 1f;
public int damageAdder = 0;
}
[CreateAssetMenu(menuName = "Attacks/PhysicalAttack")]
public class PhysicalDamege : Attacks
{
public float damageMultiplyer = 1f;
public int damageAdder = 0;
}
List
[SerializeField] List <Attacks> attacks;