Displayable but non editable Actor instance

I’m writing a plugin that spawns and manages Actor instances that must not be directly manipulated by the user. I would thus like to display these spawned actors in the Editor, but disable direct editing.

I tried setting the “bEditable” flag of my AActor class child to false, but when I do this, the actor is not even displayed in the level!

Why oh why are these two properties dependent on the same flag! And how can I effectively display and Actor AND make it not be editable?

Oh, and to make things even more complicated, I’d like it to be selectable as well. Is that even possible? If I have to override certain methods, I’d be happy to, but I really can’t find a way to do this.

Any and all help is greatly appreciated.

I bumped into the same issue. It’s strange because there is a separate variable called “bHiddenEd” which hides the actor in the editor viewport. With that, it makes absolutely no sense to have bEditable affect visibility. I may have a slight workaround and I’m not even sure it will work. I’ll put it below in case anyone wants to give it a try.

I know you want to block editing and allow selecting, but I’ve been neck deep in the engine source for a few days on editor integration and it just doesn’t seem possible. You basically want the details panel grayed out when you select the actor. Maybe you should put in a request. Meantime, the best you can do is make it visible and not selectable.

I see there is a virtual function you can override called “IsSelectable()”. If you override that and return false then – assuming it does what it says – you won’t be able to select the actor in the editor. Since you can’t select it, you can’t edit it (is my guess).

[This is an old question but answered questions are few and far between so I figured err on the side of communication.]

Wow! Talk about necro threading! :slight_smile:

IIRC I finally managed to do what I wanted by overriding the methods that catch keyboard events to stop the user from modifying stuff I didn’t want them to modify (and especially forbid them to manually delete the Actors).

If anyone needs more details, just ask and I’ll dive back into my 18 months old code :slight_smile:

Hehe. It seems appropriate when I have a problem and a post on the first page of search results doesn’t have an answer. Happens a lot, actually. Plus, I think of AnswerHub as a database and missing fields should upset any developer. :slight_smile:

it helps me out,thx