Bauen Sie Fehler im unwirklichen Motor auf
Posted: 16 Mar 2025, 16:10
Ich versuche, eine Fensterfunktion mit der MoveWindowto-Funktion in einem Spiel zu implementieren, das ich mit Unreal Engine erwerbe. Ich erhalte jedoch den folgenden Fehler: < /p>
Ich habe den Code unreal Engine -Quellen gegoogelt und überprüft, aber ich konnte den Fehler nicht finden.
Ich habe meine IDE geändert, aber es konnte nicht funktionieren>
Code: Select all
undefined symbols for architecture arm64:
"SWindow::MoveWindowTo(UE::Slate::FDeprecateVector2DParameter NewPosition)", referenced from:
AMyGameModeBase::AMyGameModeBase() in MyGameModeBase.cpp.o
ld: symbol(s) not found for architecture arm64
< /code>
Was soll ich tun?// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/GameModeBase.h"
#include "MyGameModeBase.generated.h"
/**
*
*/
UCLASS()
class MYGAME_API AMyGameModeBase : public AGameModeBase
{
GENERATED_BODY()
public:
AMyGameModeBase();
};
< /code>
MygamemodeBase.cpp
// Fill out your copyright notice in the Description page of Project Settings.
#include "MyGameModeBase.h"
AMyGameModeBase::AMyGameModeBase()
{
//For testing window position changes
sleep(1000);
if (GEngine && GEngine->GameViewport)
{
FVector2D WindowPosition = FVector2D(400.f, 300.f);
GEngine->GameViewport->GetWindow()->MoveWindowTo(WindowPosition);
}
}
< /code>
mein Computer entwickeln: < /p>
iMac 24
ram: 16GB
OS: MacOS Seqouia 15.2
< /code>
meine ide: < /p>
rider 2024.3.5
Ich habe meine IDE geändert, aber es konnte nicht funktionieren>