I’m instantiating a small number (4 to 5 instances) of the same prefab into a single scene, the prefabs are rigidbodies and are spawned in sequence over time (with a for loop) and all appear in the inspector as “nameofprefab(Clone)”
As each instance is used for a scoring mechanism I need to be able to uniquely identifiy each one for collision purposes but am unsure of how to give each instance a unique ID.
What is the best practice for this? Is there a way I can give each instance a unique name when it’s spawned? I’ve heard of “tags” but not had the chance to read about them yet - although I’m not sure if they are the correct way of solving my problem.
Secondary to this, I also need to instantiate a blob shadow projector (for each instance) which will be told to follow it - currently I attach a script to a blob shadow projector which tells it what gameobject to follow in a pre-determined fashion, I’m a bit unsure of how to automatically instantiate multiple instances of shadow projectors which dynamically are able to follow different instances (hopefully with some kind of unique ID) of the same prefab.
I really hope this makes sense!
Can anyone help with these issues?