I have for example army with knights and each of them has sword.
How can I pin it without UID or IID?
Develop games in your browser. Powerful, performant & highly capable.
Look into containers. If a sword is inside a knights container then it will be spawned together with the knight and you if you set it's position to the knight and pin it the right one will be pinned.