hey there , im trying to instantiate a Cylinder which is already in my assets as a prefab , then after its instantiated , i want to scale the clone , so i tried using an script attached on my Main Camera , that part of the script for instantiating is like this :
Public Transform Circle;
...
public void instantiator (float radius , Vector3 Pos)
{
GameObject IC = GameObject.Instantiate(Circle,Pos,transform.Rotation) as GameObject;
if(IC != null)
IC.transform.localScale = new Vector3(radius , radius , 0f);
else
Debug.Log("there is nothing instantiated");
}
… and when i instantiate it , it acts like there is nothing in the IC so it shows the message on console “there is nothing instantiated” … is there a way to solve it , or , is there any way to access the instantiated GameObject , i searched alot about it but none of those offered ways worked for me