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"

Is there a way for "Editor only" Actors


I was wondering if there is currently a way for me to have "editor only" actors. Basically I want to be able to place some custom actors and then from them bake some custom data. I know how to do the ""baking my own custom data" part but I can;t see a way to have "TOOL ONLY" actors and objects.

If there is nothing of the like maybe there is a way I can add a UCLASS property parameter to my class definition that will exclude the actor from being cooked ?

Product Version: Not Selected
more ▼

asked Feb 06 '15 at 05:38 PM in C++ Programming

avatar image

306 21 29 44

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

4 answers: sort voted first

From one of our team members:

There's a virtual that any object can override, called IsEditorOnly, and actors can flag themselves from blueprints as bIsEditorOnlyActor in the advanced section of Cooking category

more ▼

answered Apr 04 '18 at 03:28 PM

avatar image

joeGraf STAFF
1.5k 35 12 69

avatar image rYuxq Apr 04 '18 at 04:17 PM

Meaning, even if we place an actor inside a level, it wont be placed in the level of the final cooking build? Sweet!

(I just want some clarification because there has been some confusion about this before)

avatar image SRombauts Apr 13 '18 at 05:33 AM

Yes, I've tested that just a few days ago: if you implement IsEditorOnly() with return true; in your Actor class, it is not cooked into the release build game.

avatar image Robert Khalikov Oct 03 '18 at 03:05 AM

OMG! Can IsEditorOnly be used to dynamically decide whether to save a particular object in a particular case? I have a use case: https://answers.unrealengine.com/questions/780568/view.html - can you please take a look and confirm?

avatar image SRombauts Oct 03 '18 at 07:05 AM

Yes, probably since it is indeed dynamic, but there might be some more specific flag to specify that an actor is "Transient" (not in front of a computer right now)

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

Possibly, the best solution is to put your editor-only actors in a sublevel (one that's streamed in and exists in the same space as your main level). Then, when packaging, you'd have to exclude that level (either remove it from disk for packagin or only load it on WITH_EDITOR).

I'm not sure two levels is a great workflow. Using Layers would be better, but I don't know how you'd turn it off for packaging (aside from deleting that layer).

I think the Epic approach is to find an alternative to many actors. The navmesh bounds is a single large actor that aggregates the navigable area within the volume. If you want designers to place your actors and adjust properties on them, then you might have to do a lot of custom work (so actors is a much easier approach).

more ▼

answered Aug 25 '16 at 05:24 PM

avatar image

542 5 15 44

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

Hey Chrys-

Just to make sure I understand your question, you are looking for a way to have the actor usable in the editor but not show up in game, is that correct? If you need to see the actor when working with it in the editor but not see it when the game is ran you can use the "Set Visibility" option to hide the mesh during gameplay. If it's meant just for data storage you can not give it any mesh at all. Then any blueprint you create with the class will be able to be placed in the level and used to hold data/make calls but it won't be rendered since there is nothing to render. I hope this information helps and best of luck in your project.


Doug Wilson

more ▼

answered Feb 06 '15 at 07:26 PM

avatar image Chrys Feb 06 '15 at 08:40 PM

I want that the actor is not being cooked into final game data at all. i.e. if i place 100000 of these actors i don't want them to be in the final game.

i.e. something like

 class AMyDebugEditorActor : public AActor
       void SomeDebugMethods();

avatar image Doug E ♦♦ STAFF Feb 06 '15 at 09:29 PM

You should be able to use a #if WITH_EDITOR wrapper. It would look like this:

 //editor only code -- doesn't appear in final game

Anything inside the wrapper can be called while working in the editor but should be ignored in the finalized game.

avatar image Chrys Feb 06 '15 at 10:29 PM

okay but how does that work for actors saved in a level ? Will they just not be serialized ? will it remove "unknown" data ?

avatar image Doug E ♦♦ STAFF Feb 09 '15 at 03:21 PM

Hey Chrys-

I'm unsure of what exactly you're trying to accomplish. If you are trying to include certain code when working/playing the game in the editor then the WITH_EDITOR wrapper will do this for you. If you are trying to include certain assets while in the editor that you don't want in the final release, those assets would have to be explicitly removed before packaging. However data from those assets would be removed as well unless saved elsewhere (such as a separate file that is explicitly included in the packaged version).

It would be possible to create an actor/asset (such as a blueprint) that isn't actually placed anywhere. You can use the asset within the editor but as long as all references to it are removed before packaging then it would not be accessible in the final game.

If you have any other questions please describe how you are trying to use the actors you're referring to. Having a better understanding of what you're trying to do will help determine if it is possible and if so, what options are available.


Doug Wilson

avatar image Chrys Feb 09 '15 at 04:28 PM

Hi Doug, thanks for you answer,

Here is what I am trying to do :

I have a rather large "AI Network" , it consists of nodes and links which are placed and connected together via the editor.nodes consist of positions and a list of links. A link contains a pointer to nodeA and nodeB. (there is other data ofc but lets keep it simple).

I can place the nodes in the world (actors). Let's assume there is a very very large quantity of these nodes so the memory/streaming impact is non trivial.

I want to bake this data into a very lightweight format which I can read on my UE4 client and I can read it on my non-UE server.

What I usually do when doing this kind of system is I create an "editor" version of my data and then I bake my data to a "game version" . in this case my "Game version" is only server side. I dont want any of it on the client.

This is why I want my placed actors to be present only in tool and not in game.

I hope this explanation clears things up.

Keep in mind I am able to modify the engine source code so on a previous UE3 project we hooked into the cooking and removed certain things from being baked (or added stuff on baking) but that was UE3, I am hoping that with UE4 there is already a "good way" of doing this :)

avatar image Doug E ♦♦ STAFF Feb 09 '15 at 05:21 PM

It sounds like what you are trying to accomplish is a means of AI control and navigation. Rather than using a node system (which is how it was done in UDK) you can instead use a Navigation Mesh Bounds Volume. This NavMesh can be used to simplify how to determine the parts of the level bots and AI can move to and interact with. Below is a link to the documentation page for NavMeshs as well as a user made video tutorial on creating and setting up a NavMesh

Docs : https://docs.unrealengine.com/latest/INT/Engine/AI/BehaviorTrees/QuickStart/2/index.html

User Video: https://www.youtube.com/watch?v=VAAHKNoIg0w

Let me know if this helps or if you have any other questions.


Doug Wilson

avatar image Chrys Feb 09 '15 at 06:41 PM

I appreciate the links but I think this isn't really part of my question :)

You asked me what i was trying to accomplish and there was just the answer as to why I need to have "Tool only data" .

avatar image Doug E ♦♦ STAFF Mar 19 '15 at 07:05 PM

Hey Chrys-

I apologize for the delayed response. You could try using the #if WITH_EDITOR wrapper in an Actor class. If you write the entire class inside the wrapper then any use of that actor will only be present while working in the editor, however you would still need to save a copy of the actor's information elsewhere if you want it to exist when not in editor. Alternatively, rather than have a countless number of actors in the scene each holding the data required (lets refer to this as tempActor), you could try creating a "data" actor. The data actor can then be used when you add an instance of tempActor to the scene. The tempActor will calculate the information it would need, pass that information to the data actor and then delete itself. In this way the data actor acts as a spreadsheet of all the information each tempActor would hold.

avatar image rYuxq Apr 10 '16 at 07:34 PM

Hello! Sorry for reviving this old post, but I am interested in this feature as well. Is it possible by now? What I need is exactly as it is described there. To provide further explanation:

I am procedurally creating e.g. buildings. I use a blueprint for this with widgets and set their variables through the details panel. The blueprint uses other blueprints as well and constructs them dynamically at editor-time. Now, when I bake my project I want to completely remove this building blueprint and all its sub-blueprints from the world. I just dont want it to be included. Yes, this may sound weird, but I am actually going to have another tool which will scan through my world and replace certain blueprints in a way, that I will only have the static meshes left in the editor. Those will be placed statically (as opposed to the dynamic construction). The tool will also set the blueprint that was used to invisible, so that it will not interfere with further development. But I do not want to remove that blueprint entirely, because I want to be able to undo the step above for the case that I e.g. am not contend with the way the building looks. In that case I could simply remove the static representation of the blueprint and turn back to my constructing blueprint, were I tweak the building anew and then turn it static again once Im finished.

The reason I want to do this is simply for performance. I do not need to dynamically construct those objects at runtime, so it is fine if the construction happens only at editor-time.

avatar image Chrys Apr 10 '16 at 11:27 PM

From what Doug said it should be possible to just wrap the code that is editor only into a #if WITH_EDITOR wrapper and the entire class would disappear from the build when cooked. I am not sure what happens to the data though if it gets stripped as well since it is now unknown data (or unknown actor in my specific case). I still have to test this but i had to put it on hold to work on some other stuff. Will try get back to it and report back at some point. Please do let me know if you find out aby useful information too. :)

avatar image rYuxq Apr 11 '16 at 07:28 AM

I sure will do :) I kind of doubt that wrapping the blueprint into #if WITH_EDITOR will be even useful.... Also, how do I wrap a non-c++ blueprint with it? I mean, my tools are whole blueprints doing handy work, they are not simply data :/

I think this feature is missing and it should be considered whether they should add it in a future update.

avatar image rYuxq Apr 11 '16 at 09:01 AM

I think I might have found something. Take a look at Project Settings > Packaging > Directories to never cook

I think this might do the trick, but I have no way to test it currently

Edit: never mind, this throws an error when packaging

avatar image rYuxq Apr 16 '16 at 07:24 AM

Btw, I tested this:

I wrote a C++ actor and wrapped the class inside "if WITH_EDITOR" and created a blueprint from it. I placed an instance of the blueprint in the level and had it print a string at BeginPlay. But when packaging the linker throws an error. It tries to link the methods and classes that are within the wrapped WITH_EDITOR and complains that there are no such classes and methods declared anywhere. This happens in MyProject.generated.h (if MyProject is my project name)

avatar image Chrys Apr 17 '16 at 01:14 AM

I suspected this might happen. I think we really need an attribute on the UCLASS macro that tells the unrealbuild tool that a class needs to be stripped from the shipping game build.

avatar image rYuxq Apr 17 '16 at 07:39 AM

I also fear that this thread is not going to get any further attention... In that case I might try to repost this question sometime after I have tried to change the source code of UE to implement this change. But I think it would be much quicker if this was implemented by Epic, since it does not sound too difficult...

avatar image Chrys Apr 18 '16 at 01:33 AM

It would be preferable if Epic would provide this but yes if you manage to get this working please post back, I am still working on other stuff but once I get back to this I will keep the thread updated.

avatar image rYuxq Mar 19 '17 at 09:37 AM

I actually discovered something today. Components have a boolean "Is Editor Only" property. If it is set to true, it will be excluded from cooked builds. This does exactly what we want (at least for components).

Can we see the same for actors as well?

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

This is just a partial answer to your question but: I actually discovered something today. Components have a boolean "Is Editor Only" property. If it is set to true, it will be excluded from cooked builds. This does exactly what we want (at least for components).

I hope we will get the same for actors and objects as well

more ▼

answered Mar 19 '17 at 09:39 AM

avatar image

151 5 11 14

avatar image idbrii Mar 30 '17 at 06:24 PM

It's really important that when using that property with scenecomponents, all of the children also have that option set! Putting an editor-only billboard as the root and putting your mesh under that will break in crazy ways (all components at origin or other madness).

avatar image Yata Apr 18 '17 at 05:45 AM

I hope we will get the same for actors and objects as well putting your mesh under that will break in crazy ways

I hope Epic Games will start to deliver complete features someday. PS. I also want Editor only content in Asset Browser (excluding cooked folders does not work for plugins) and EditorOnly EventGraphs in Blueprints, for Blutility functions. (because if you use some functions from Editor plugins or modules cooking will fail.)
(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