BlueprintPure functions


Just a quick question, but are BlueprintPure UFUNCTIONS not mapped to Skookumscript? Currently it seems that just all BlueprintCallable UFUNCTIONS are automatically mapped.


Hmm our UnrealHeaderTool plugin does not actually look at the flags of an UFUNCTION macro, so BlueprintCallable or not, it shouldn’t make a difference. There are some conditions though that prevent a UFUNCTION from being exported to SkookumScript:

  1. The method is only present in the editor, i.e. enclosed by #if WITH_EDITOR. Currently, for compatibility with cooked builds, such methods are not reflected.
  2. The method has a parameter that has an unsupported type, such as a delegate or a UInterface (I actually just discovered a bug where weak object pointer parameters are also rejected even though they are supported - I fixed this and posted the fix on GitHub)
  3. The method is located inside a module that is not listed in SkookumScript.ini

Is one of the above situations the case with your function?


I don’t believe that I meet any of those restrictions, but I could be wrong… here are a few of the functions that are not getting mapped:

UFUNCTION(BlueprintPure, Category = "HexGrid | HexPiece")
UHexGridPieceMapInfo* GetHexGridPieceInfo(int32 x, int32 y, int32 z);
UFUNCTION(BlueprintPure, Category = "HexGrid | HexPiece")
UHexGridPieceMapInfo* GetHexInfo(int32 x, int32 y, int32 z, bool bSearch = true);
UFUNCTION(BlueprintPure, Category = "HexGrid | HexPiece")
void GetHexAtLocation(const FVector Location, UHexGridPieceMapInfo*& HexInfo);
UFUNCTION(BlueprintPure, Category = "HexGrid | HexPiece")
bool GetHexAtLocationFromHitResult(const FHitResult Location, UHexGridPieceMapInfo*& HexInfo);

Hmm… the only thing that sticks out is UHexGridPieceMapInfo, which is mapped by SkookumScript to a class.


If you change the flags from BlueprintPure to BlueprintCallable, do they show in :sk: then?


Obviously my first idea was wrong because they do not show in SK when changed to BlueprintCallable, is there a reason UHexGridPieceMapInfo would not be an acceptable parameter?


Found the reason… and as I suspected, as this is a very old plugin I am working with, when I wrote it I didn’t put the PLUGIN_API in the class definitions


Well if none of the functions shows up in :sk: at all then it’s probably not due to the UHexGridPieceMapInfo since that’s used only in two of them.

So just to be sure, it seems like these methods are part of your game module, I assume you set up your game module according to our guide for C++ projects?


From what I just found, it seems that not having the (in this case) HEXPLUGIN_API in the class definition will still have the class exported, but nothing other than the class definition. All I did was add that to UHexGridMapPieceInfo and it exported all the functions.