I want to have a custom component which will have a drop down. I want this to be applied to ever GameObject in the project, which means every GameObject in the hierarchy and every GameObject prefab. Something like a transform component. It should not be removable, and it should be added by default when creating new GameObjects.
In the drop down, I will select a few options, and I want to store those values in an array on that custom forced component for that GameObject.
So if I have 2 new GameObjects in scene named XYZ and ABC, and the component is PQR, I should be able to do this-
ABC.GetComponent<PQR>().someArrayVar = whatever; XYZ.GetComponent<PQR>().someArrayVar = anotherWhatever;
Anyone know how to do this? Any help appreciated. Thanks in advance :)