mirror of
https://github.com/DerTyp7/fps-citybuild-unity.git
synced 2025-10-30 12:37:08 +01:00
Bug Fix: Blueprint overlapping
All blueprints now get deleted before when a new one gets created.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user