Im trying to add a prefab to another at runtime, i am using:
weapon.transform.parent = player.transform;
Unfortunately it comes up with the error:
Setting the parent of a transform which resides in a prefab is disabled to prevent data corruption.
Any ideas?