Hi,
I cleared my log to make sure I was seeing the right thing, but when I press play, the output log tells me that the input component was fond, and then that it’s not.
The warnings and error are on the bottom of the output:
LogPlayLevel: PlayLevel: No blueprints needed recompiling
PIE: New page: PIE session: NewMap (Jan 12, 2017, 7:49:15 AM)
LogPlayLevel: Creating play world package: /Game/UEDPIE_0_NewMap
LogPlayLevel: PIE: StaticDuplicateObject took: (0.007704s)
LogAIModule: Creating AISystem for world NewMap
LogPlayLevel: PIE: World Init took: (0.001528s)
LogPlayLevel: PIE: Created PIE world by copying editor world from /Game/NewMap.NewMap to /Game/UEDPIE_0_NewMap.NewMap (0.009746s)
LogInit: XAudio2 using ‘Line Out (Scarlett 18i6 USB)’ : 2 channels at 44.1 kHz using 16 bits per sample (channel mask 0x3)
LogInit: FAudioDevice initialized.
LogWorld: Game class is ‘BuildingEscapeGameMode_BP_C’
LogWorld: Bringing World /Game/UEDPIE_0_NewMap.NewMap up for play (max tick rate 0) at 2017.01.12-12.49.15
LogWorld: Bringing up level for play took: 0.006408
** LogTemp:Warning: Grabber reported for duty!**
** LogTemp:Warning: PhysicsHandle found!**
** LogTemp:Warning: Input Component found!**
** LogTemp:Warning: Grabber reported for duty!**
** LogTemp:Warning: PhysicsHandle found!**
** LogTemp:Error: Input Component not found!**
PIE: Info Play in editor start time for /Game/UEDPIE_0_NewMap 0.294
My Code:
///Look for the attached Input Component
MyInputComponent = GetOwner()->FindComponentByClass<UInputComponent>();
if (MyInputComponent) {
//Input COmponent found
UE_LOG(LogTemp, Warning, TEXT("Input Component found!"))
}
else
{
UE_LOG(LogTemp, Error, TEXT("Input Component not found! "), *GetOwner()->GetName())
}
One must be the blueprint and the other, generated at runtime. I don’t recall every having to remove the blueprint? Confused on what I should do about this…
Yes, you have 2 DefaultPawn_BPs when the game begins. The PlayerStart is where “you” get created and spawned into the world. Yet you have another one in your scene that’s just…there. If you remove the one you added to your scene you should get logs saying “found”.
And I just realised I mistyped in my previous comment, I meant 2 Pawns not 2 GrabberComponents.
I removed the one I created and now my game won’t play. My output is:
LogLinker:Warning: Can’t find file ‘/Game/DefaultPawn_BP’
LogLinker:Warning: Can’t find file for asset ‘/Game/DefaultPawn_BP’ while loading …/…/…/…/…/…/Udemy/UnrealClass/03_BuildingEscape/BuildingEscape/Content/BuildingEscapeGameMode_BP.uasset.
LoadErrors:Error: Error /Game/BuildingEscapeGameMode_BP : Can’t find file for asset. /Game/DefaultPawn_BP
LogLinker:Warning: Can’t find file ‘/Game/DefaultPawn_BP’
LogLinker:Warning: Can’t find file for asset ‘/Game/DefaultPawn_BP’ while loading …/…/…/…/…/…/Udemy/UnrealClass/03_BuildingEscape/BuildingEscape/Content/BuildingEscapeGameMode_BP.uasset.
LogLinker:Warning: Can’t find file ‘/Game/DefaultPawn_BP’
LogLinker:Warning: Can’t find file for asset ‘/Game/DefaultPawn_BP’ while loading NULL.
LogLinker:Warning: Can’t find file ‘/Game/DefaultPawn_BP’
LogLinker:Warning: Can’t find file for asset ‘/Game/DefaultPawn_BP’ while loading NULL.
LogLinker:Warning: Can’t find file ‘/Game/DefaultPawn_BP’
LoadErrors: Info Failed to load /Game/DefaultPawn_BP.DefaultPawn_BP_C Referenced by Default__BuildingEscapeGameMode_BP_C
LogLinker:Warning: Can’t find file for asset ‘/Game/DefaultPawn_BP’ while loading NULL.
LogWorld: Game class is ‘BuildingEscapeGameMode_BP_C’
LogWorld: Bringing World /Game/UEDPIE_0_NewMap.NewMap up for play (max tick rate 0) at 2017.01.18-03.32.53
LogWorld: Bringing up level for play took: 0.005356
LogContentBrowser: Native class hierarchy updated for ‘MovieSceneCapture’ in 0.0032 seconds. Added 11 classes and 0 folders.
PIE: Info Play in editor start time for /Game/UEDPIE_0_NewMap 0.736
I’m trying to pull a copy down from bitbucket, but I’m having trouble. Going to have to learn a bit more about git before I’m straightend out i guess.
Did you remove it from your project or your scene? Because I was talking about the scene. You had a PlayerStart which spawns the DefaultPawn_BP and a DefaultPawn_BP in your scene.
Hmm,
I think I removed it from the project…
Yeah lemme figure out how to get that back in and then I’ll learn the difference between a project and a scene!!! Thanks