0
Not a Bug

Error on update: the value of 'current item' in for each loop must be assigned

squirtzMD 1 year ago updated by Lazlo Bonin (Lead Developer) 1 year ago 3

This worked perfectly in bolt 1.3 but on update it seems to dislike this situation. I tried a workaround involving assigning this to a variable first as another user suggested but it didn't help. 


*I experimented a little and it's specifically the get transform that's causing issues*


Bolt Version:
1.4.5
Unity Version:
2018.1
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
Pending Review

Hi Squirtz,

It's hard to tell exactly what is happening without looking at the whole graph, but it sounds like you're trying to access an item in the list after the for each has exited. Could that be the case?

Sorry my edit to this question didn't  save. I noticed later that was the case, and while you could access the contents of a for each loop in 1.3 you can no longer do so (as someone mentioned to me in this discord this is for stability and not a bug). Sorry to waste your time here!

Not a Bug

No problem, and you're never wasting my time by reporting bugs. Glad you were able to sort this out.