Beispiel #1
0
    void SpawnRail(Vector3Int cube, Path path)
    {
        GameObject newRailObj = Instantiate(railPrefab);
        Rail       newRail    = newRailObj.GetComponent <Rail>();

        newRail.transform.SetParent(railHolder.transform);
        newRail.Initialize(cube, path);
        rails.Add(newRail);
    }