I am trying to add a script to all game objects in a scene. I have gameobjects created in unity and gameobjects imported from 3d model software. The ones imported from a 3d model software makes the console get mad and say "You cant add script to this gameobject because its a generated prefab and can only be modified through an AssetPostProcessor" How can I make code to check if the gameobject is a generated prefab at runtime?
↧