Essentially, I created a Dictionary of GameObjects and integers. The GameObjects are prefabs, and the integers are how many instances of them are in the scene.
I have ‘buildings’ and, at the start, a script goes through all the buildings and adds them to the Dictionary. The plan is that if the dictionary does not include that prefab it will get added, otherwise it will increase the instanceCount by 1.
My question is how do get the prefab GameObject? Getting just the GameObject won’t help because they all have different names, but a reasonably extensive internet search did not come up with any ideas other than PrefabUtility.GetPrefabObject(), which is obsolete.
Thank you very much for your help! If you need clarification on any points, please ask!