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 commandlet from module?

I have a commandlet I've written for generating uassets needed for my plugin. I've found plenty of good examples of how to run the commandlet when the editor starts up from the command line. The only thing is I'd prefer for the end user to not have to manually input that each time they start a new project. Is there anyway to run a Commandlet when a module starts up?

I tried calling the Commandlets main, from StratupModule but that just led to a crash with:

Fatal error: [File:/opt/unreal-engine/Engine/Source/Runtime/CoreUObject/Private/UObject/UObjectGlobals.cpp] [Line: 3307] FObjectInitializer::Get() can only be used inside of UObject-derived class constructor. [2017.05.23-00.04.33:226][ 0]LogLinux:Error: appError called: Assertion failed: Assertion failed: [File:/opt/unreal-engine/Engine/Source/Runtime/CoreUObject/Private/UObject/UObjectGlobals.cpp] [Line: 3307] FObjectInitializer::Get() can only be used inside of UObject-derived class constructor.

Signal 11 caught. Malloc Size=131076 LargeMemoryPoolOffset=131092

Would fork / exe, or CreateProcess be fine to use with Unreal during startup for this?

Product Version: UE 4.15
Tags:
more ▼

asked May 23 '17 at 12:05 AM in C++ Programming

avatar image

zerophase
133 7 17 25

avatar image Shadowriver May 23 '17 at 07:35 PM

You got clearly written what is cause of crash

FObjectInitializer::Get() can only be used inside of UObject-derived class

Module class is not UObject class

avatar image zerophase May 24 '17 at 12:53 AM

Yeah, I understand that. Still trying to avoid having to write platform specific code in case there's an undocumented exec function anywhere that I can call.

avatar image Nitronoid Jul 06 '17 at 04:19 PM

Can you post the code you used to call the commandlets main function? I am trying to do the same. Thanks!

(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