// Use this for initialization public void BuildBody(UnitData unitData) { GameObject go = (GameObject)Instantiate(bodyPrefab, transform); GetComponent <CharacterMovement>().SetBody(go); BuildUnit.Build(go, unitData); Destroy(this); }
//This is a temoprary class for building sprites, the build should be called from the units main script void Awake() { BuildUnit.Build(this.gameObject, uD); }