New GUID generated on break struct

Get method on a guid property of a struct change the value into a new guid.

Honestly I don’t even know how it is possible… being a struct it should be impossible to edit a value

Hello MaxiHori,

I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Can you reproduce this issue in a clean project?
  2. If so, could you provide a detailed set of steps to reproduce this issue on our end?
  3. Could you provide screen shots of any other blueprints that may be involved?
  1. yes

  2. create a struct with a guid parameter and use it

After running a few tests it appears that everything is working as intended. Could you elaborate on how the result you are getting is at an inverse to your expectations?

in the last example I have 2 print string, they should print the same value, but instead they print 2 different values.

I did not change the value of ID in “structtest”, I did not assign the ID to a new guid, so the values should be the same.
furthermore “structtest” is not even an object, it is a struct and as a struct it should be impossible to change it’s values, the only way should be to create a new struct and assign the old variables to the new one.

I think I may be able to help clear up some of the confusion that you are having. The part about the multiple print strings calling difference IDs, this is working as intended because the node “New Guid” is called again each time the print string is called. This in combination with the fact that every time “New Guid” is called is supposed to give a unique identifier means that you will receive a new ID with each print string (when using the setup given in the example). As for the other issue, you are using the node “Make Structtest” which is creating an instance of the struct “Structtest” and it is setting the ID portion of the struct with the New Guid node. I hope that this information helps.

Make it a great day

I see, I forgot the fact that everytime I use those functions as parameters the entire stack get called again and it’s not just using the latest available value.
sorry for the trouble then, you are right it is working as it should be. but it is confusing!

So then what is the correct way to generate a unique GUID once (on the server) and pass around a struct with a reference to the GUID object without the GUID changing? I’m stuck on the same exact problem :frowning: