Array options nodes not showing up

Hi everyone!

So I’m pretty new to Unreal and right now i have to do a project in it for my uni course and I’ve been having this problem for over a few hours now. It’s probably just something very simple but i can not for the love of god find out what the problem is (should also mention that I’m really new to programming and blueprints).

Basically I added to my blueprint a new variable that is object type related to another blueprint, and it’s also an array. My professor gives us this PDF where he gives us instructions of what to do in a lot of detail but I can still not find what the problem is even after reading that thing at least 50 times. I’m supposed to put this array I just did into the Event Graph and then, from its pin, get these nodes that are related to arrays (I think). The thing is that none of them appear when I search. Hopefully you guys can figure out very easily what the problem is (should also mention that the main node I was looking for and didn’t show up was ForEachLoop).

1 Like

So you add your variable as a new Array of Objects, then you drag it into the blueprint graph, and you click “Get” on it.

Then you draw a line from the pin, and do like this:

image

click the “Utilities” then the “Array” drop downs if they aren’t auto opened. (that surprised me a bit that those don’t auto open, but i almost always start typing the name of the node i’m looking for, which auto opens things)

Yeah I did all of that, and those options still dont show up. I don’t know what I did wrong

Are you sure it’s an array? Could you by accident set it to a Map or Set?

Yup, it’s an array. I had to set it as an object type related to another blueprint I have and then also changed it to an array. Nothing comes up

I also just tried to open another blueprint and add a new array and still nothing comes up so I don’t know what’s wrong.

Please show a screenshot of the variable definition

ofc

It looks like an array within an array. I think you over-engineered the task a bit.
It should be of type BP Ceiling Light (reference) that you then need to convert to an array (like in my example)

If bp ceiling light is some sort of external reference to an array (a bit strange) then try to iterate the reference directly (set the right array to just 1 instance of the class)

BP Ceiling Light is simply a blueprint and I also have several instances of the blue print on my scene (in total it’s 12 instances). My goal would be to create a variable that would be an array of all this instances (this being the variable I showcased, “Lights”). Maybe it would help if I showed the partion of the PDF I’m trying to follow (BP_IndoorLight is supposed to be my BP_CeilingLights and the BP_LightsButoon is supposed to be where I’m doing all of this).

Perhaps you are picking the wrong actor to reference in that case. You should look for the singular version of the blueprint actor that you seek.

The reference does not look at the scene count of instances of the actor it’s just a shortcut describing what type of variable it is

Perhaps you are doing a circular reference, referencing a variable of the same name that is already present inside the widget??

Don’t think so. The variable is referring the right thing, which would be the blueprint for the ceiling lights and I also already put inside this array, in the editor, all the instances I have and once I put the Lights variable in the event graph and try to search for the ForEachLoop node, nothing shows up :confused:
image

Hi, can you share a snapshot with your blueprint - the Array variable in the blueprint and your Menu that shows up when you drag out from the pin - similar to the snapshot 3dRaven shows that has the ForEachLoop in it…

Then reference blueprint with the light array directly no need for another array

You should be able to get the for loop just make sure you drag out the array “lights” from within the main “light manager” bp

Dont forget to expose it or put in a getter for it (the light array ofc)

ofc, hope that shows everything needed

Thanks - and just to confirm - can you type “for” in the search box please?

sry, I didn’t quite get what you mean. I only have this one array that contains all the lights I have on my scene. The only thing I’m doing is referencing the bp from where all those instances come from.

sure thing

@ BojukaBog it is still a nested array

Thanks, Can you change the Variable Type from an Array of BP_CeilingLights to an Array of Floats and see if you get the ForEach then?

I just tested a similar setup here and I get the For: