MyFunction( Class *& foo )
Inside a derivative BP of the above C++ class:
foo
shows up as an output rather than an input.
Why?
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It only takes a minute to sign up.
Sign up to join this communityNon-const
references in C++ functions exposed to Blueprint are always treated as outputs by the parser in UnrealHeaderTool.
You can see this in the (very involved) logic of FHeaderParser::GetVarType
in Engine/Source/Programs/UnrealHeaderTool/Private/HeaderParser.cpp
. This is called by ParseParameterList
during parsing a functions parameter list.
If you want foo
to be an input, add const
(this is what functions like RandomFloatFromRangeInStream
do to facilitate passing the heavyweight stream parameter as an input).
You cannot make it simultaneously an input and an output parameter.