I used the code below to programmatically create clones of my prefabs. When I try to resize the prefab in prefab mode by none of the clones are updated. I used a simple sprite image to create my prefab and added it through the inspector using a public GameObject property.
or (int i = 0; i < tar.numOfItems; i++)
{
var rot = Quaternion.Euler(0f, 0f, tar.spin + angle);
var localPos = rot * Vector3.right * tar.radius;
tar.spawnedObjects.Add(Instantiate(tar.clonedObject,
tar.transform.position + localPos, rot));
angle += angleBetween;
tar.spawnedObjects[i].name = tar.spawnedObjects[i].name + (i + 1);
}
So the clonedObject is a public GameObject field added through the inspector. Am I creating my prefab clones in the right way, before I am having issues updating them? Please note that I am using Unity 2019.1.
Unity 2019.1
, I wasn't using the prefab mode in play mode. The code I provided was in the editor class. – Zizo