sideeffects / HoudiniEngineForUnreal-v2

Houdini Engine Plugin for Unreal Engine 4 - Version 2
http://www.sidefx.com/unreal
Other
294 stars 75 forks source link

Simplified getting the asset state as string, removed unused helpers #156

Open moppius opened 2 years ago

moppius commented 2 years ago

EnumToString was failing to compile on Linux, and these helper functions seem surplus to requirements - they were only used in one place, and it seems neater just to call UEnum::GetValueAsString directly.

This is the Linux build error we hit:

/build/ue4/Engine/Plugins/Runtime/HoudiniEngine/Source/HoudiniEngineRuntime/Private/HoudiniEngineRuntimeUtils.h:173:18: error: no matching function for call to 'FindObject'
                        UEnum* Enum = FindObject<UEnum>(ANY_PACKAGE, *EnumName);
                                      ^~~~~~~~~~~~~~~~~
/build/ue4/Engine/Source/Runtime/CoreUObject/Public/UObject/UObjectGlobals.h:1255:11: note: candidate function template not viable: cannot convert argument of incomplete type 'UPackage *' to 'UObject *' for 1st argument
moppius commented 2 years ago

The Linux compile issue seems to be fixed in 2.0.3 somehow, although I notice that the original methods are still there, and still seem to be redundant (why not just use UEnum::GetValueAsString inline?).

Feel free to close this PR if you don't want the change 🙂