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"

Run code before packaging

I'd like to run some code before my game is packaged (from the editor, not the Unreal Front End). Is there a delegate I can bind to that gets called before packaging starts?

Product Version: UE 4.14
Tags:
more ▼

asked Jan 09 '17 at 07:58 PM in Packaging & Deployment

avatar image

kgamble
909 40 57 201

avatar image Matthew J ♦♦ STAFF Jan 10 '17 at 03:04 PM

Hello kgamble,

I know a couple of people who may be able to give me some suggestions but I would need to know what you aim to do. Could you give an example of what you're trying to have called prior to the packaging process?

avatar image kgamble Jan 10 '17 at 04:52 PM

We have a custom UAsset type in our project for dialog and we found that one of the files got out of sync with the graph (the graph was correct but some dialog lines led to the wrong place when we ran through it in game). We're not sure how that happened but I was able to write a function that makes sure everything is synced up correctly and want to run it automatically before we package.

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

1 answer: sort voted first

From what you describe that you need to do, it seems like the best way to do this would be to override Serialize, use Ar.IsSaving() && Ar.IsCooking() to make sure the engine is packaging, execute your logic, and then call Super::Serialize. If you're looking for a more reactive solution that won't involve adding more logic to every time it needs to be loaded, a commandlet may be best, but you would need to already know it has gone bad and do it manually.

more ▼

answered Jan 10 '17 at 06:58 PM

avatar image

Matthew J ♦♦ STAFF
31.8k 526 92 417

(comments are locked)
10|2000 characters needed characters left
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