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 to make an array of spawned static meshes ?

I'm spawning a lot of static meshes from an array like this:

alt text

How do I make an array from the static meshes spawned this way ? The only way I know of would be to get all actors by class and then remove everything that doesn't have the appropriate tag but as far as I know it's impossible to tag spawned meshes.

Any help is appreciated !

Product Version: UE 4.9
this.jpg (136.4 kB)
more ▼

asked Oct 27 '15 at 07:16 PM in Blueprint Scripting

avatar image

179 20 19 25

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

1 answer: sort voted first


I've set up a simple test where I added Static Mesh Components using a for loop, and then added each component to an Array variable that I created.

First, you have to create a new variable of type Static Mesh Component->Reference, and ensure that you click the Array box next to the variable type (looks like a grid). Then, try to duplicate the blueprint that I have in the picture below:

alt text

What I'm doing is creating the meshes, and then once the loop is completed, I'm running through it and printing out the names of the components. (This is only for testing purposes to ensure that your array is being populated properly). Give that a shot and feel free to let me know if you have any further questions, or if something isn't functioning properly.

arrayofmeshes.png (159.8 kB)
more ▼

answered Oct 27 '15 at 08:10 PM

avatar image

Sean L ♦♦ STAFF
43.5k 485 152 443

avatar image marcomaryred Oct 28 '15 at 12:16 PM

Thanks, I ended up using a different method but I would't have done it without your comment !! :)

(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