// Use this for initialization void Start() { //GameObject ObjectEmpty = (GameObject)Resources.Load("ObjectEmpty"); ObjectEmpty = GameObject.Find("/ObjectEmpty"); objCreaterScript = (objCreater)ObjectEmpty.GetComponent("objCreater"); }
void Start() { ObjectEmpty = GameObject.Find("/ObjectEmpty"); objCreaterScript = (objCreater)ObjectEmpty.GetComponent("objCreater"); // ball initial position this.transform.position = ballPosition; this.rigidbody.velocity = ballVelocity; }