I’m not an advanced programmer and I have used Unity and C# before. Last week I started to use Unreal Engine, so working on it and learning the Blueprint-system has given a little challenge.
Anyhow, I have a problem which I don’t seem to solve myself. I have two levels in my project; in the first level you’ll be able to put a spotlight object on a map, and then when you’re changing levels, that spotlight should be on there in the place where you just put it.
I have got the object to spawn in the other level, but getting the transform information for it has been a challenge.
So this is the BP for the spotlight. The content in the red box doesn’t work. The transform is correct in Make Array node, but in the Set node it says that Variable is not in scope. Which is funny, since it can still find it in that Transform Function. So it can’t set the value in the variable New Spotlight Transform Array.
And here is the Level BP for level #2. It doesn’t give the error Variable not in scope, but the value for everything is always 0,0,0.
The BP and New Spotlight Transform Array variable in GameInstance. The variable is public, I’ve checked it many times.
So what on earth could be the problem? Why it doesn’t set the transform info to the array that’s located in GameInstance?