Hello,
I'm currently stuck with an issue and cannot seem to find an answer, any help would be great.
I keep getting "InvalidCastException: Specified cast is not valid" with my buffing system.
***Error from line:*** healOverTime = (HealOverTime)buff;
private HealOverTime healOverTime;
public HealOverTimeBuff(float duration, ScriptableBuff buff, GameObject obj, float tickRate) : base(duration, buff, obj, tickRate)
{
this.character = obj.GetComponent();
if (this.character == null)
{
End();
return;
}
healOverTime = (HealOverTime)buff;
}
HealOverTime inherits from ScriptableBuff class.
Thanks!
↧