My Info:
- Windows 8.1 64-bit
- Visual Studio 2013 Update 4
- Unreal Engine 4.8 (binary from launcher)
- Project was created in 4.7 and updated to 4.8
- [DefaultGame.ini][1]
I am not able to get the Additional Asset Directories to Cook feature working in my project. Here is how I am validating this result.
Add an asset directory that I want to cook.
This asset directory contains textures that I reference in C++:
They are initialized in my constructor via a static like so (all works fine in PIE):
struct FConstructorStatics
{
ConstructorHelpers::FObjectFinderOptional<UTexture2D> T_Face_Button_Left;
ConstructorHelpers::FObjectFinderOptional<UTexture2D> T_Face_Button_Right;
ConstructorHelpers::FObjectFinderOptional<UTexture2D> T_Face_Button_Top;
ConstructorHelpers::FObjectFinderOptional<UTexture2D> T_Face_Button_Bottom;
ConstructorHelpers::FObjectFinderOptional<UTexture2D> T_Left_Shoulder;
ConstructorHelpers::FObjectFinderOptional<UTexture2D> T_Left_Trigger;
ConstructorHelpers::FObjectFinderOptional<UTexture2D> T_Right_Shoulder;
ConstructorHelpers::FObjectFinderOptional<UTexture2D> T_Right_Trigger;
ConstructorHelpers::FObjectFinderOptional<UTexture2D> T_DPAD;
ConstructorHelpers::FObjectFinderOptional<UTexture2D> T_Left_Analog;
ConstructorHelpers::FObjectFinderOptional<UTexture2D> T_Right_Analog;
ConstructorHelpers::FObjectFinderOptional<UTexture2D> T_Start;
ConstructorHelpers::FObjectFinderOptional<UTexture2D> T_Special;
#if IsPS4
FConstructorStatics()
: T_Face_Button_Left(TEXT("/Game/UI/GamepadIcons/PS4/PS4_Square")),
T_Face_Button_Top(TEXT("/Game/UI/GamepadIcons/PS4/PS4_Triangle")),
T_Face_Button_Right(TEXT("/Game/UI/GamepadIcons/PS4/PS4_Circle")),
T_Face_Button_Bottom(TEXT("/Game/UI/GamepadIcons/PS4/PS4_Cross")),
T_Left_Shoulder(TEXT("/Game/UI/GamepadIcons/PS4/PS4_L1")),
T_Left_Trigger(TEXT("/Game/UI/GamepadIcons/PS4/PS4_L2")),
T_Right_Shoulder(TEXT("/Game/UI/GamepadIcons/PS4/PS4_R1")),
T_Right_Trigger(TEXT("/Game/UI/GamepadIcons/PS4/PS4_R2")),
T_DPAD(TEXT("/Game/UI/GamepadIcons/PS4/PS4_Dpad")),
T_Left_Analog(TEXT("/Game/UI/GamepadIcons/PS4/PS4_Left_Stick")),
T_Right_Analog(TEXT("/Game/UI/GamepadIcons/PS4/PS4_Right_Stick")),
T_Start(TEXT("/Game/UI/GamepadIcons/PS4/PS4_Options")),
T_Special(TEXT("/Game/UI/GamepadIcons/PS4/PS4_Share"))
{
}
#elif IsXboxOne
FConstructorStatics()
: T_Face_Button_Left(TEXT("/Game/UI/GamepadIcons/XboxOne/XboxOne_X")),
T_Face_Button_Top(TEXT("/Game/UI/GamepadIcons/XboxOne/XboxOne_Y")),
T_Face_Button_Right(TEXT("/Game/UI/GamepadIcons/XboxOne/XboxOne_B")),
T_Face_Button_Bottom(TEXT("/Game/UI/GamepadIcons/XboxOne/XboxOne_A")),
T_Left_Shoulder(TEXT("/Game/UI/GamepadIcons/XboxOne/XboxOne_LB")),
T_Left_Trigger(TEXT("/Game/UI/GamepadIcons/XboxOne/XboxOne_LT")),
T_Right_Shoulder(TEXT("/Game/UI/GamepadIcons/XboxOne/XboxOne_RB")),
T_Right_Trigger(TEXT("/Game/UI/GamepadIcons/XboxOne/XboxOne_RT")),
T_DPAD(TEXT("/Game/UI/GamepadIcons/XboxOne/XboxOne_Dpad")),
T_Left_Analog(TEXT("/Game/UI/GamepadIcons/XboxOne/XboxOne_Left_Stick")),
T_Right_Analog(TEXT("/Game/UI/GamepadIcons/XboxOne/XboxOne_Right_Stick")),
T_Start(TEXT("/Game/UI/GamepadIcons/XboxOne/XboxOne_Menu")),
T_Special(TEXT("/Game/UI/GamepadIcons/XboxOne/XboxOne_Windows"))
{
}
#endif
};
After packaging the build, I expect this folder to exist in the final package folder, it does not.
Am I misinterpreting the asset directory parameter? How do I get these additional assets into my packaged build?
Things Iāve tried:
- Creating a User Widget that uses these textures as images. I then create a reference to that User Widget in my main HUD but again there is no change in packaging.
- Copying the .uasset files manually to the packaged folder, this results in a [crash in GarbageCollection.cpp][5]. Iām unsure if the assets are problematic or something else.
- Creating a .uasset file in the GamepadIcons folder, thinking that perhaps an empty folder was preventing the inner XboxOne folder from being scanned.
- Using the Cook Everything in the project content folder option
- Every variant of 32/64-bit development/shipping/DebugGame
- Packaging in editor
- Packaging via UnrealFrontend
Here is the [log output from packaging in editor][6]
None of these attempts resulted in any change in output. Please tell me what Iām doing wrong here, Iām sure itās something fundamental or alternatively something is fundamentally broken.