/Engine/Source/Runtime/GameplayTasks/Classes/GameplayTask.h
Calling this function makes sense only until the task is being passed over to the GameplayTasksComponent. Once that's that resources data is consumed and further changes won't get applied
void AddRequiredResource ( [TSubclassOf](API\Runtime\CoreUObject\Templates\TSubclassOf)< [UGameplayTaskResource](API\Runtime\GameplayTasks\UGameplayTaskResource) > RequiredResource )