Hi,
I am just getting into c++ and unreal engine so I may be doing something wrong.
Whenever I try to package the project and launch the packaged version it throws an error. I am almost definitely certain that it is related to c++ because if I do the same with blueprints it launches without any problem. The project can be played inside the editor and no error is thrown. The code is only a single function for scrolling up
h.
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "Kismet/BlueprintFunctionLibrary.h"
#include "PlayerMovementLib.generated.h"
/**
*
*/
UCLASS()
class THECOLONY_API UPlayerMovementLib : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
//Increase the height value
UFUNCTION(BlueprintCallable, Category = "TopDownCameraControl")
static int32 IncreaseHeight(int32 CurrentHeight);
}
.cpp
// Fill out your copyright notice in the Description page of Project Settings.
#include "TheColony.h"
#include "PlayerMovementLib.h"
int32 UPlayerMovementLib::IncreaseHeight(int32 CurrentHeight)
{
int32 ClampedHeight = CurrentHeight;
ClampedHeight++;
//Set higher Boundary
if (CurrentHeight >= 13)
{
ClampedHeight = 13;
}
return ClampedHeight;
}
The blueprint
The error
The project compile fine in visual studio and packages fine from the UEEditor. I can successfully launch the game from visual studio without any error in the following build configurations: DebugGame and Development