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"

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.

Product Version: UE 4.10
Tags:
more ▼

asked Apr 29 '16 at 11:23 AM in C++ Programming

avatar image

LarrxX
11 2 5

avatar image Jin_VE Jun 20 '17 at 09:39 AM

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.

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

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.]

more ▼

answered Jun 20 '17 at 09:41 AM

avatar image

Jin_VE
4.3k 31 75 40

avatar image LarrxX Jun 21 '17 at 09:53 AM

Wow! Talk about necro threading! :)

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 :)

avatar image Jin_VE Jun 21 '17 at 01:59 PM

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. :)

avatar image frikezhao Dec 07 '17 at 01:45 PM

it helps me out,thx

(comments are locked)
10|2000 characters needed characters left
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