Hello,
So after adding the following snippets of code in Player -
[SerializeField] SpecialAbilityConfig specialAbility01;
specialAbility01.AddComponent(gameObject);
and selecting the Power Attack for specialAbility01 under Player in the inspector, on runtime I get the following error:
NullReferenceException: Object reference not set to an instance of an object
RPG.Characters.PowerAttackConfig.AddComponent (UnityEngine.GameObject gameObjectToAttachTo) (at Assets/Characters/SpecialAbilities/PowerAttack/PowerAttackConfig.cs:18)
RPG.Characters.Player.Start () (at Assets/Characters/Player/Player.cs:46)
âPowerAttackConfig.cs:18â points to
behaviourComponent.SetPowerAttackConfig(this);
and âPlayer.cs:46â points to
specialAbility01.AddComponent(gameObject);
This has me scratching my head , any help would be greatly appreciated.
Thanks!