When I declare a multicast delegate, I am unable to compile and am given a vague error:
1>------ Build started: Project: UBoats, Configuration: DebugGame_Editor x64 ------
1> Parsing headers for UBoatsEditor
1>LogWindows : error : Windows GetLastError: The operation completed successfully. (0)
1>Error : Failed to generate code for UBoatsEditor - error code: CrashOrAssert (3)
1> UnrealHeaderTool failed for target 'UBoatsEditor' (platform: Win64, module info: C:\Users\Cobryis\Dev\DePaulWorkspace\UBoats\Intermediate\Build\Win64\UBoatsEditor\DebugGame\UnrealHeaderTool.manifest).
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command ""C:\Program Files\Epic Games\4.7\Engine\Build\BatchFiles\Build.bat" UBoatsEditor Win64 DebugGame "C:\Users\Cobryis\Dev\DePaulWorkspace\UBoats\UBoats.uproject" -rocket" exited with code -1.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I’m using the Launcher 4.7 binaries.
#pragma once
#include "Engine/GameInstance.h"
#include "OnlineIdentityInterface.h"
#include "OnlineSessionInterface.h"
#include "UBGameInstance.generated.h"
USTRUCT(BlueprintType)
struct FServerInfo
{
GENERATED_USTRUCT_BODY()
UPROPERTY()
FString ServerName;
UPROPERTY()
int32 PlayerCount;
UPROPERTY()
FString ServerIP;
FServerInfo()
{}
FServerInfo(const FString& InServerIP, const FString& InServerName, int32 InPlayerCount)
: ServerName(InServerName)
, PlayerCount(InPlayerCount)
, ServerIP(InServerIP)
{
}
};
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FServerListRetrievedDelegate, const TArray<FServerInfo>&, ServerList);
UCLASS(config = Game)
class UUBGameInstance : public UGameInstance
{
...
Also, when I try using a singlecast delegate, the OneParam doesn’t show up in Blueprint - the event is just an execution node. I think a singlecast is fine in my case, but I can’t get it to work where I need it to, so that’s why I am trying multicast.
If anyone could help me with either of these issues, that’d be awesome.