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"

[C++ Tool] Select Actor in Editor using C++

Hello everyone!

I'm creating a tool in C++ and I want my actor to select another actor in the editor/world. Precisely, on the Actor's EditorKeyPressed event, I check if the enter key is pressed, actor is selected, and if the actor has a parent actor. If all conditions are met, I would then select the parent actor.


Product Version: UE 4.8
more ▼

asked Jul 30 '15 at 10:57 PM in C++ Programming

avatar image

20 3 4 8

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

1 answer: sort voted first



I think all you need is input actor. Lot of editor operations can be done from UEditorEngine, which global pointer to is GEditor.


Remember that if you put this code gameplay module place editor code inside #if WITH_EDITOR #endif borders or else your project won't cook.

more ▼

answered Jul 31 '15 at 12:04 AM

avatar image

37.8k 937 172 1123

avatar image ポケレゲ Jul 31 '15 at 01:06 AM

Thanks for the answer! (^_^)

avatar image Ryan Darcey Aug 03 '16 at 10:06 PM

hmmm...got this error when I tried. any ideas?

1> [2/2] Link UE4Editor-Prizefighter-Win64-Debug.dll 1> Creating library C:\UnrealEngine\Prizefighter\Intermediate/Build/Win64\UE4Editor\Debug\UE4Editor-Prizefighter-Win64-Debug.lib and object C:\UnrealEngine\Prizefighter\Intermediate/Build/Win64\UE4Editor\Debug\UE4Editor-Prizefighter-Win64-Debug.exp 1>Module.Prizefighter.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) class UEditorEngine * GEditor" (__imp_?GEditor@@3PEAVUEditorEngine@@EA) 1>C:\UnrealEngine\Prizefighter\Binaries\Win64\UE4Editor-Prizefighter-Win64-Debug.dll : fatal error LNK1120: 1 unresolved externals

(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