x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Error packaging project with Editor module using UFactory

I was working on custom asset and noticed I'm having some errors with project packaging. After narrowing down possible errors I've came down to the fact having UFactory in Editor module produce error during package

 UnrealBuildTool: Error: Couldn't find parent type for 'CustomAssetFactory' named 'UFactory' in current module or any other module parsed so far.

These are modules I have currently.

 "Modules": [
     {
       "Name": "TestGame",
       "Type": "Runtime",
       "LoadingPhase": "Default"
     },
     {
       "Name": "CustomToolEditor",
       "Type": "Editor",
       "LoadingPhase": "PostEngineInit"
     }

After narrowing error down I have no editor dependent code in my runtime module, even WITH_EDITOR blocks of code are temporary commented out.

CustomToolEditorModule only contains startup and shutdown methods.

 #pragma once
 
 class FDialogueToolEditorModule : public IModuleInterface
 {
 public:
     virtual void StartupModule() override;
     virtual void ShutdownModule() override;
 };

.cpp has basic definition and IMPLEMENT_GAME_MODULE(FCustomToolEditorModule, CustomToolEditor); inside

UFactory derived class seems almost empty as well.

 #pragma once
 
 #include "CustomAssetFactory.generated.h"
 
 UCLASS()
 class CUSTOMTOOLEDITOR_API UCustomAssetFactory : public UFactory
 {
     GENERATED_BODY()
         virtual UObject* FactoryCreateNew(UClass* Class, UObject* InParent, FName Name, EObjectFlags Flags, UObject* Context, FFeedbackContext* Warn) override;
         virtual bool CanCreateNew() const override;
 };

Build.cs has UnrealEd module only enabled for editor

 PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
 PublicDependencyModuleNames.AddRange(new string[] {
     "InputCore",
     "Engine",
     "Core",
     "CoreUObject",
 });
 if (UEBuildConfiguration.bBuildEditor)
 {
     PrivateDependencyModuleNames.Add("UnrealEd");
 }

     PrivateDependencyModuleNames.AddRange(new string[] { "TestGame" });


I don't really understand why editor module (along with UFactory) is getting hooked up when is marked as Editor module. What is happening?

Product Version: UE 4.16
Tags:
more ▼

asked Aug 10 '17 at 12:48 PM in C++ Programming

avatar image

Unteroid
74 12 16 20

avatar image raianlp Oct 06 '17 at 03:45 PM

Have the same issue! Can someone from Epic team help?

(comments are locked)
10|2000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question