Not 100% sure I understand what’s going up there but consider the following:
- struct and the DT:
- the gun actor holds a Name for identification and a struct for its data:
-
when the gun actor is spawned, it will query the DT and assign the data row to its own variable. Next time you interact with this gun, you can use that variable, no need to query the DT anymore.
-
as a bonus, you can now modify gun data, since every gun has its own set.
And if you need to get the original data, use the Name identifier to fetch it from the DT.