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"

On Component Edited callback (C++)

Hi,

I am currently working on a ledge system. I've prototyped my system using Blueprints and want to now rebuild the system in c++ for performance and handling reasons. My ledge actors contain a spline component which marks the actual ledge. Because I couldn't get the spline to trigger overlaps, I wrap the spline in proxy box components. In Blueprint I did the wrapping in the Construction-Script, however that doesn't work in c++. I am now looking for the right place to do the wrapping. I have tried PostActorCreated() and PostLoad(), but both haven't worked.

Is there a method that is called every time a component of the actor is changed? Or better yet, is there a way to specifically listen for changes to the spline?

Cheers, Todd

Product Version: UE 4.9
Tags:
more ▼

asked Jan 04 '16 at 10:32 PM in C++ Programming

avatar image

ToddW
8 1 2 6

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

1 answer: sort voted first

Have you tried the c++ OnConstruct method? That's the equivalent of the construction script.

If you want a general "after actor created / loaded", use PostInitializeComponents. Don't forget to call the parent method.

more ▼

answered Jan 05 '16 at 12:12 PM

avatar image

TTaM
1.7k 81 28 81

avatar image ToddW Jan 05 '16 at 02:04 PM

Thank you! That is the right place! One weird thing though: The BoxComponents I'm creating aren't showing up in the editor anymore even though I haven't changed the code for their creation. Do you have an idea why that is?

avatar image TTaM Jan 05 '16 at 02:15 PM

Not a clue!

(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