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"

Cannot package project due to use of a Factory

I use a custom factory in my project to allow easy creation of custom assets in the editor. When I try to package my project, I get an error saying "Cannot open include file: 'Factory.generated.h': No such file or directory".

My build output is here in case anybody wants to see it: http://pastebin.com/raw/iJhc7CtG

I understand Factories are really only useful when developing in the editor, is there some way to conditionally exclude them from the build process when packaging?

Thanks!

Product Version: UE 4.10
Tags:
more ▼

asked Apr 13 '16 at 06:30 PM in C++ Programming

avatar image

janimationd
427 20 96 123

avatar image janimationd Apr 30 '16 at 12:25 AM

Are factories something that should be stopping the packaging process in the first place?

avatar image janimationd May 02 '16 at 06:56 PM

This is a much simpler question, could I at least get an answer to this?

avatar image janimationd May 27 '16 at 05:28 PM

Post is now six weeks old, bump

avatar image janimationd Jul 21 '16 at 07:49 PM

Extremely simple question, post is now over 3 months old

avatar image BrUnO XaVIeR Aug 02 '16 at 11:30 PM

UFactory is declared at:

Module: UnrealEd

Header: Editor/UnrealEd/Classes/Factories/Factory.h

You cannot package a game shipping Editor modules. If you want to use factories, you must create a Module with IMPLEMENT_MODULE() macro and create your factories in there; making sure that module will NOT be loaded by GAME modules. This is why your packaging fails, because you implement references to classes that are Editor only.

To create an Editor Module for your game project, look at a guide here: https://wiki.unrealengine.com/Creating_an_Editor_Module

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I had a similar problem with a *.generated.h not being found/built. Ended up deleting the "./Intermediate/Build" folder of the project to fix it. The next build time was a bit of a bear, but it fixed the problem for me. Wasn't related to a factory class though.

If that doesn't work, I think I also greped for files under "./Intermediate" containing references to the offending header and deleted some those as well.

more ▼

answered May 28 '16 at 02:34 AM

avatar image

Smerom
31 1 2 2

avatar image janimationd Aug 02 '16 at 04:11 PM

This did not fix the issue. Thanks though.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
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