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"

Get Components by Class or by Tag: no referencing

The array that you get as output of the nodes "Get Components by Tag" or "Get Components by Class" is bugged. You are supposed to be able to use get with a reference or with a copy by choice. However, those arrays only allow getting "by copy". If you then press rightclick on the output of the get node to change the output mode to "reference", the description text while hovering above the get node is still saying that it's a copy you are getting. When you then once again press rightclick on the output, the option to change the output into a reference is greyed out.

Here is a picture and a gif to shocase the problem https://gyazo.com/8260cf7e14e43ac6ac159588f5eb6517


Product Version: UE 4.16
more ▼

asked Jun 14 '17 at 02:23 PM in Bug Reports

avatar image

89 6 12 17

avatar image Quexlaw Jun 16 '17 at 09:43 AM

bump... (is that even allowed? And does it even work?)

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

1 answer: sort voted first

Maybe a bit late on this, but anyway.

I'm not entirely familiar with the internal workings of the TArray in Blueprint, but what I do know applies to managed, object oriented programming: it shouldn't matter.

Why is this? Because objects in C++ are commonly stored somewhere in RAM. All you have to access them is a so-called pointer. A pointer is nothing but a numeric address. You dereference these pointers to access the object behind them. Accordingly you can have various pointers to the same memory address.

This is what's happening here. The object is somewhere in RAM (managed by UE4's garbage collector, it's address may even change at runtime), and the array merely contains numeric values that are interpreted as pointers to objects of a certain class. If you get a copy of such a pointer, you still change the actual object. If you were to get a reference of such a pointer, you'd be allowed to "rewrite" the numeric address of the pointer, effectively making it point to a different object.

As you can probably imagine, the latter is a rather uncommon use-case. So for most uses, it really shouldn't matter.

more ▼

answered Jan 10 '18 at 01:47 PM

avatar image

132 8 12 14

avatar image g.rod Dec 27 '18 at 12:01 AM

I'm afraid not, the return specifically says it (will NOT) be propagated back into the array after you've changed the copy.

(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