reymesson1 / android-ejercicio-unity

0 stars 0 forks source link

new Object - Scripting #1

Open reymesson1 opened 5 years ago

reymesson1 commented 5 years ago

https://stackoverflow.com/questions/51959242/add-script-to-gameobject-can-not-find-the-script

reymesson1 commented 5 years ago

http://file.allitebooks.com/20170928/Mobile%20Game%20Development%20with%20Unity.pdf

reymesson1 commented 5 years ago

GameObject a = new GameObject("BallObject");

reymesson1 commented 5 years ago

http://ivl.calit2.net/wiki/images/3/35/UnityScripting.pdf

reymesson1 commented 5 years ago

myGameObject.AddComponent();

reymesson1 commented 5 years ago

public class PlayerScript : MonoBehaviour { Rigidbody rb;

void Start() {
    rb = GetComponent<Rigidbody>();
}
void FixedUpdate()  {
    rb.AddForce(Vector3.up);
}

}