Hello everyone. I having a lot of problems to access to the editor modules. Im trying to connect two custom pawn functions with the sequence recorder delegates. I need to execute this functions when i press the rec button in the Sequence Recorder panel. i added de private paths and public paths in the build.cs and i added the addmodules to. In the target.cs file i added the addmodules to. i don’t know whats going on. please help me.
i posting the code in the post.
**Gravedad Código Descripción Proyecto Archivo Línea Estado suprimido
Error LNK2019 sÝmbolo externo “public: static struct FSequenceRecorder & __cdecl FSequenceRecorder::Get(void)” (?Get@FSequenceRecorder@@SAAEAU1@XZ) sin resolver al que se hace referencia en la funci¾n “public: void __cdecl ACustomPawn::InitDependences(void)” (?InitDependences@ACustomPawn@@QEAAXXZ) Tutorial D:\UE4Projects\UE423Test\Tutorial\Intermediate\ProjectFiles\CustomPawn.cpp.obj 1 **
**Gravedad Código Descripción Proyecto Archivo Línea Estado suprimido
Error MSB3075 El comando ““C:\Program Files\Epic Games\UE_4.23\Engine\Build\BatchFiles\Build.bat” TutorialEditor Win64 Development -Project=“D:\UE4Projects\UE423Test\Tutorial\Tutorial.uproject” -WaitMutex -FromMsBuild” salió con el código 5. Compruebe que tiene derechos suficientes para ejecutar este comando. Tutorial C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets 44 **
Tutorial.Build.cs:
*using UnrealBuildTool;
public class Tutorial : ModuleRules
{
public Tutorial(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
PrivateIncludePaths.AddRange(
new string] {
"C:/Program Files/Epic Games/UE_4.23/Engine/Source/Editor/SequenceRecorder/Private",
"C:/Program Files/Epic Games/UE_4.23/Engine/Source/Editor/SequenceRecorder/Private/Sections",
}
);
PublicDependencyModuleNames.AddRange(new string] {
"Core",
"CoreUObject",
"Engine",
"InputCore",
"GameplayTasks" ,
"SequenceRecorder",
"LevelSequence",
"MovieScene",
"TimeManagement",
"SerializedRecorderInterface",
"MovieSceneTracks"
});
PrivateDependencyModuleNames.AddRange(new string] {
"Core",
"CoreUObject",
"SlateCore",
"Slate",
"Engine",
"InputCore",
"SequenceRecorder",
"UnrealEd",
"EditorStyle",
"Projects",
"Persona",
"WorkspaceMenuStructure",
"PropertyEditor",
"LevelEditor",
"MovieScene",
"MovieSceneTracks",
"LevelSequence",
"NetworkReplayStreaming",
"AssetRegistry",
"CinematicCamera",
"EditorWidgets",
"Kismet",
"LiveLinkInterface",
"SerializedRecorderInterface"
});
// Uncomment if you are using Slate UI
// PrivateDependencyModuleNames.AddRange(new string] { "Slate", "SlateCore" });
// Uncomment if you are using online features
// PrivateDependencyModuleNames.Add("OnlineSubsystem");
// To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true
}
}*
Tutorial.Target.cs:
*using UnrealBuildTool;
using System.Collections.Generic;
public class TutorialTarget : TargetRules
{
public TutorialTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Game;
ExtraModuleNames.AddRange( new string] { "Tutorial", "SequenceRecorder" } );
}
}*
CustomPawn.h:
*#pragma once
#include “CoreMinimal.h”
#include “UObject/ObjectMacros.h”
#include “Kismet/BlueprintFunctionLibrary.h”
#include “Modules/ModuleManager.h”
#include “GameFramework/Pawn.h”
#include “CustomPawn.generated.h”
//class UMovieSceneSequence;
UCLASS()
class TUTORIAL_API ACustomPawn : public APawn
{
GENERATED_BODY()
public:
// Sets default values for this pawn’s properties
ACustomPawn();
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
// Called to bind functionality to input
virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
UFUNCTION()
void InitDependences();
UFUNCTION()
void OnRec(UMovieSceneSequence* movie);
UFUNCTION()
void OnStop(UMovieSceneSequence* movie);
//FSequenceRecorder* recorderRef;
};*
CustomPawn.cpp:
*#include “CustomPawn.h”
#include “SequenceRecorder.h”
#include “SequenceRecordingBase.h”
// Sets default values
ACustomPawn::ACustomPawn()
{
// Set this pawn to call Tick() every frame. You can turn this off to improve performance if you don’t need it.
PrimaryActorTick.bCanEverTick = true;
//FModuleManager::Get().LoadModule(TEXT(“SequenceRecorder”));
}
// Called when the game starts or when spawned
void ACustomPawn::BeginPlay()
{
Super::BeginPlay();
UE_LOG(LogTemp, Warning, TEXT("atempting to take a reference of a Sequence Recorder"));
//FSequenceRecorder::Get().OnRecordingStartedDelegate.AddUObject(this, &ACustomPawn::OnRec);
//FSequenceRecorder::Get().OnRecordingStartedDelegate.AddUObject(this, &ACustomPawn::OnStop);
}
// Called every frame
void ACustomPawn::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
}
// Called to bind functionality to input
void ACustomPawn::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{
Super::SetupPlayerInputComponent(PlayerInputComponent);
}
void ACustomPawn::InitDependences() {
if (FModuleManager::Get().IsModuleLoaded(TEXT(“SequenceRecorder”))) {
FSequenceRecorder::Get().OnRecordingStartedDelegate.AddUObject(this, &ACustomPawn::OnRec);
FSequenceRecorder::Get().OnRecordingStartedDelegate.AddUObject(this, &ACustomPawn::OnStop);
}
//FSequenceRecorder::Get().ClearQueuedRecordings();
}
void ACustomPawn::OnRec(UMovieSceneSequence* movie) {
//if (GEngine)GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Yellow, TEXT(“Start ■■■■”));
}
void ACustomPawn::OnStop(UMovieSceneSequence* movie) {
//if (GEngine)GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Yellow, TEXT(“Stop ■■■■”));
}*