Error: C++ Default parameter not parsed: "nullptr"

anonymous_user_1ed1c3df
Sat, 18 Feb 2017 08:19:57 +0000
UI

I have a UFUNCTION that takes in a type of TScriptableInterface as one of its parameters. In the header, I have default values set for everything so when called in blueprint the function node has the defaults auto-filled. The compiler is throwing fits about object types not having a default value when the primitives do, so I want to set it to nullptr just to make it happy. This works for class types AActor actor = nullptr, but not for TScriptableInterface for some reason. Is there another null type I can set it to?

UFUNCTION(BlueprintCallable, Category="BuffComponent")
 virtual void Initialize(
    float _timeCreated = 0.0,
    float _lifeSpan = 6.0,
    float _tickRate = 1.0,
    bool _bIsExpirable = true,
    TScriptInterface<class IBuffableInterface> _owner = nullptr
 );



Error: C++ Default parameter not parsed: _owner "nullptr"

10 posts - 4 participants