[DEV] - Does a stable part "identifier" exists?
SPD13 opened this issue ยท 2 comments
Hi,
I am facing an dev problem in the script module. I need to find a way to identify a unique Part among the Vessel(s) that is consistent across all the Vessel's instanciations (Load, Scene change, etc...)
For example, in the script modules where i need to select a Docking port, i create a list of the existing docking ports before the lift-off and in the script module configuration, i store the index of this part in the list. Next time the script is loaded, i iterate again on the vessel to find the docking ports and select the same index in the list. But if the vessel structure has changed, the Part i will be referring is not the correct one and may even not exist any more on the vessel.
Is there somewhere a unique identifier for a part that stays consistent?
I tried "GetInstanceID" but it's changing when the game is loaded
I tried to force an ID on the "part.tag" but i can't set it.
Thank you for the help