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"

How get actor object reference from a static mesh?

Hi, how can I get actor object reference from a static mesh given via blueprint? I need to add a static mesh component and it requires an actor object reference but the tool that i'm developing need to take the user static mesh from the blueprint. How can I do without place the mesh in the scene?alt text

Product Version: UE 4.20
Tags:
cattura.png (143.0 kB)
more ▼

asked Mar 04 '19 at 12:32 AM in Blueprint Scripting

avatar image

pitta
3 1 6

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

2 answers: sort voted first

Cast it. Pull the blue pin out of the static mesh node and look for cast...actor in the list...

more ▼

answered Mar 04 '19 at 07:37 AM

avatar image

ClockworkOcean
265 3 4 4

avatar image pitta Mar 04 '19 at 05:30 PM

Pulling the blue pin out of the static mesh node there are no context sensitive element in the list. Also without check the context sensitive and casting to an actor the cast alwayes fail because 'Actor' does not inherit from 'static mesh'.alt text

cattura.png (85.3 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Sorry Pitta. I will take a look next time I'm on the machine.

What about pulling the pin and looking for something along the lines of 'get...actor...'?

more ▼

answered Mar 05 '19 at 08:21 AM

avatar image

ClockworkOcean
265 3 4 4

avatar image pitta Mar 05 '19 at 11:01 AM

Nope, nothing like get actor. I'm becoming mad hahaha. I tryed adding a static mesh component, my static mesh and set the static mesh to the static mesh component getting next the owner but unfortunately it spawn just one actor and i can't use this in a for loop.

avatar image ClockworkOcean Mar 05 '19 at 11:07 AM

I will take a look when I get a chance...

(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