Deprecation mark

hi everyone,
i am working with some friends at a ue4 project,
i searched for a “mark as deprecated” function
isn’t there any function like that? so nobody of my dev’s know that this functions get removed/reworked :confused:
most of my friends dont understand how to work with c++, so i need a function for the blueprint version
comments dont work, u can call the functions without warning ^^

You can add a DeprecatedFunction metadata tag to the deprecated UFUNCTION specifier.

UFUNCTION(meta=(DeprecatedFunction, DeprecationMessage="Function has been deprecated, Please use the new function")

Think he was on about Blueprint. As it is in the BP section.

1 Like

In that case, I do not believe it is possible to mark a BP function as deprecated outside of C++

Edit: I was wrong here, see my comment below.

thats right, i cant find any solution for that, just in c++
may i should use tags and print errors on gamestart if (tag "deprecated > 0) but i can’t tag all types of classes, like widgets arn’t tagable :&

Ok I think there is a couple ways to deprecate bps:

If you want to deprecate the entire blueprint class you go into the blueprint’s class settings, in the advanced dropdown of the ‘Class Options’ category there is a checkbox for ‘Deprecate’. Checking this will make the class and it’s children no longer placeable in the world.

You can mark blueprint functions, events and variables as deprecated as well. Select the property/node and in the details open the advanced dropdown there is a ‘deprecated’ checkbox. Checking this will display a warning if someone tries to use the property/function.

1 Like

Odd that you can deprecate a function in C++, but not a class, enum, or struct.