private GameObject GetOrCreatePathLine(ClientTile tile, ClientPath clientPath) { var pooled = _pathlinesPool.FirstOrDefault(path => !path.activeInHierarchy); if (pooled == null) { Log.Debug("Created new path line"); pooled = MainBehaviour.Instantiate(Resources.Load("prefabs/HalfPath")) as GameObject; _pathlinesPool.Add(pooled); } else { pooled.SetActive(true); pooled.transform.rotation = Quaternion.identity; } clientPath.Add(tile, pooled); return(pooled); }