Hey guys,
I am very new to UE4, an I am stumbling upon the following:
I am using the exact same code as mentioned , only looking for APlayerStart instead of AStaticMeshActor. (I am talking about the very bottom code snippet). Unfortunately, Visual Studio won’t compile this, outputting the Error:
error C2027: use of undefined type ‘APlayerStart’
When I try to use TObjectIterator or TActorIterator, it doesn’t work either.
What should I do?
EDIT:
When I hover over the iterator in the next line (which is of course underlined red) it tells me
Error: Pointer to incomplete class type is not allowed
Is that because of a missing include? I did, however, include EngineUtils.h, so it’s not that…
No the file you are looking for is “PlayerStart.h”
You can get directly to it from the editor if you need to read it.
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
//=============================================================================
// Player start location.
//=============================================================================
#pragma once
#include "PlayerStart.generated.h"
UCLASS(ClassGroup=Common, hidecategories=Collision)
class ENGINE_API APlayerStart : public ANavigationObjectBase
{
GENERATED_UCLASS_BODY()
/** Used when searching for which playerstart to use. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Object)
FName PlayerStartTag;
#if WITH_EDITORONLY_DATA
UPROPERTY()
TSubobjectPtr<class UArrowComponent> ArrowComponent;
#endif
virtual void PostInitializeComponents() override;
virtual void PostUnregisterAllComponents() override;
};
is there an easy way to find out, where that header file is located?
I found that specific one, but it would help if I knew a way to find the location without looking into the documentation.