OK so i have a class ballisticWeapon
and its a general class with the standard way to aim a weapon and general properties all ballistic weapons should have.
Now i to create a ballistic turret but this is basically the actual weapon now so i want to fill in all the values. How exactly is the best way to do this.
I thought i could just make a new script called say MG Turret to attach to the actual MG Turret prefab
then
BallisticWeapon turret;
void start()
{
turret = new BallisticWeapon();
}
but when i do that the value of turret is still null.
as shown by debug.log(turret)
Do I actually have to attach the ballisticWeapon script to the turret prefab and go
ballisticweapon Turret;
void Start(){
Turret = this.root.getcomponentinchildren();
}
?