Start and Update dont work and checkmark for enabling/disabling script has disappeard
when i hit play in unity, i noticed that the bullets didn't move. I looked at the variables from the inspector and they are still 0, even though in the other scrip they are 20. I changed the values from 0 to 20 manually for testing but they are still not moving. Then i also noticed that there is no checkmark for enabling or disabling. WTF is going on?! Here's my scipt:
using UnityEngine;
public class BulletInfo : MonoBehaviour {
public int Damage, Speed;
public WeaponInfo Currentweapon;
//WeaponInfo is a script's name
public GameObject Camera;
void start()
{
//Get the Damage and speed that's already defined in the other script
Damage = Currentweapon.Damage;
Speed = Currentweapon.BulletSpeed;
}
void update()
{
//Move the bullet towards where the camera is facing
gameObject.GetComponent<Rigidbody>().AddForce(Camera.transform.forward * Speed);
}
Answer by hameed-ullah-jan · Apr 14, 2019 at 02:50 PM
you making the spelling mistake: correct the spelling "Start" and "Update" like this
Your answer
Follow this Question
Related Questions
Inspector doesn't show updated values for public variables (ISSUE or IGNORANCE?) 1 Answer
Script / Start() and Update() not being called 2 Answers
Where have the tutorials gone? 0 Answers
Why aren't my scripts updating in my project? 1 Answer
transform position not working on start() only on update() 1 Answer