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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Actor Constructor called twice

It seems that the constructor for an Actor is called twice. When you start dragging a class from the class browser (or a blueprint deriving from it from the content browser) into the world, one instance gets created that is shown while you keep dragging. Then when you release the mouse and the Actor is placed in the world, another instance of the Actor is created at that location, and the old one gets deleted by the garbage collector sometime later.

Now my question is, how can I detect if I'm in such a temporary instance in C++ or blueprints? Is there anything unique about these temporaries that I could use to identify them?

Product Version: Not Selected
Tags:
more ▼

asked Jul 21 '14 at 01:53 PM in C++ Programming

avatar image

melak47
21 1 2 8

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

1 answer: sort voted first

There is a function available for this - UObject::IsTemplate(), but i'm not sure what flag you have to pass to the function to check if it's preview actor; it's RF_Transient probably.

more ▼

answered Jul 21 '14 at 02:02 PM

avatar image

BiggestSmile
1.6k 54 38 105

avatar image melak47 Jul 21 '14 at 02:49 PM

RF_Transient works perfectly. Thank you!

(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