So im trying to load resources with a certain path.
I’m currently doing this:
using UnityEngine;
using System.Collections;
public abstract class SpellDataBase {
private string TexturePath = "GameArt/SpellIcons/";
public Texture2D icon;
private PlayerHUD owner;
public abstract void Cast();
public class FireBall : SpellDataBase
{
public FireBall(PlayerHUD owner)
{
this.owner = owner;
this.icon = Resources.Load(TexturePath + "FireBall") as Texture2D;
}
public override void Cast()
{
Debug.Log("FireBall casted...");
}
}
}
But I get no luck, can someone please assist me. I tried looking on the forums, but the fixes don’t work.