I am making an angry bird type 2d game using Unity and C#. After I throw the ball from catapult, I have no idea on reloading the ball. Then I use SceneAsync to reload the ball but it is the worst thing I've ever made since I can't make the other sprite objects to continue their movents after the ball is thrown. So what code should I use to reload the balls after throwing?
You can use Instantiate method that unity provides for instantiating new gameobjects. Just keep a static reference for initial position like:
private static Vector3 initialPosition = new Vector3(10, 10, 0) //The values are dummy
And also keep a reference for the ball's prefab:
public Gameobject ballPrefab; //Drag the ball prefab in the editor
And finally when it comes to instantiate:
Gameobject newBall = Instantiate (ballPrefab, initialPosition, Quaternion.identity) as Gameobject;
Now the newBall will appear in the scene with the position you set with "initialPositon". And the newBall variable keeps reference for the new object that you have instantiated