Bug Fix: Blueprint overlapping

All blueprints now get deleted before when a new one gets created.
This commit is contained in:
DerTyp187
2021-09-27 11:07:41 +02:00
parent 05de734ecc
commit ed0c5cece6
3 changed files with 8 additions and 1 deletions

View File

@@ -19,6 +19,12 @@ public abstract class BuildingBlueprint : MonoBehaviour
private void Start()
{
GameObject[] blueprints = GameObject.FindGameObjectsWithTag("Blueprint");
foreach (GameObject blueprint in blueprints)
GameObject.Destroy(blueprint);
gameObject.tag = "Blueprint";
terrain = GameObject.FindGameObjectWithTag("Terrain");
Init();
}