I get this error below:
Failed to add class AI_Controller. Failed to automatically hot reload the ‘CplusplusAI’ module.
Why am I getting this error, the file appears in the folder in my documents, but it does not appear in the c++ folder in Unreal 4.7 editor. Is this just a bug or something else?
Hmm try renameing the class to it might conflicting with AIController in engine code
so try a different name than?
yep, still getting the same result. Failed to add class AI. Failed to automatically hot reload the ‘CplusplusAI’ module.
now is there a way to just import the class from the file in the documents were it created it instead?
Ok then, can you show your code, atleast header file, also do you get that error without hot reload (build when editor is turned off)?
// Fill out your copyright notice in the Description page of Project Settings.
#include “CplusplusAI.h”
#include “AI_Controller.h”
This one generated correctly…got the function and everything loaded…
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include “AIController.h”
#include “AI.generated.h”
/**
*
*/
UCLASS()
class CPLUSPLUSAI_API AAI : public AAIController
{
GENERATED_BODY()
just that other one would not…I will send a screen shot too…
Paste code, select it and click 101010101 icon on top it will format it correcly like this:
include "CplusplusAI.h"
include "AI_Controller.h"
// Fill out your copyright notice in the Description page of Project Settings.
#include "CplusplusAI.h"
#include "AI_Controller.h"
see it is not creating the AI class, the character is there, but not the AI class…
// Fill out your copyright notice in the Description page of Project Settings.
#include "CplusplusAI.h"
#include "AI_Controller.h"
I aasked you to paste header file, .h it the one that actully decler the class, also i asked if you get this error if you biuld it without hot reload (when editor is closed)
but it does not appear in the bottom, only the AI character does.
ah, one sec, I thought that was the .h file…
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "GameFramework/Character.h"
#include "AICharacter.generated.h"
UCLASS()
class CPLUSPLUSAI_API AAICharacter : public ACharacter
{
GENERATED_BODY()
public:
// Sets default values for this character's properties
AAICharacter();
// Called when the game starts or when spawned
virtual void BeginPlay() override;
// Called every frame
virtual void Tick( float DeltaSeconds ) override;
// Called to bind functionality to input
virtual void SetupPlayerInputComponent(class UInputComponent* InputComponent) override;
};
my bad I had the wrong tab highlighted. so I sent the wrong code…this is the .h file I just posted.
it’s AICharacter not AI_Controller