thanks for a very useful tutorial. when you generate a source, can you attach a random property like a barcode to each can/item so it can be read later for example by barcode reader?
You would need to attach a script to the source with a property for the barcode. This script will be also called on every MU when it is created (because MU is a copy of source). Or you attach a script to the source and use the event EventMUCreated. This event of the source could call a script which is getting passed the created MU. In this script you can add your own scripts to the MU and init your custom properties. You might need to use such kind of a central script if e.g. the values for the barcodes should be taken from a central list. It is maybe an idea to implement in future releases a kind of property value pairs to MUs which can be used in sensors without any programming
thanks for a very useful tutorial. when you generate a source, can you attach a random property like a barcode to each can/item so it can be read later for example by barcode reader?
You would need to attach a script to the source with a property for the barcode. This script will be also called on every MU when it is created (because MU is a copy of source). Or you attach a script to the source and use the event EventMUCreated. This event of the source could call a script which is getting passed the created MU. In this script you can add your own scripts to the MU and init your custom properties. You might need to use such kind of a central script if e.g. the values for the barcodes should be taken from a central list. It is maybe an idea to implement in future releases a kind of property value pairs to MUs which can be used in sensors without any programming