1. Hey, im having a bug in counting the Foundations since the last Update.
    Code to count:
    Code:
            private int Count(List<BuildingBlock> ConnectingStructure, string buildingobject)
            {
                int count = 0;
                var templist = ConnectingStructure.ToList();
                foreach (BuildingBlock block in templist)
                {
                    if (block == null) ConnectingStructure.Remove(block);
                    else { if (block.name == buildingobject) count++; }
                }
                return count;
            }
    and usage:
    Code:
                            var trifcount = Count(ConnectingStructure, TriangleFoundation);
                            var fcount = Count(ConnectingStructure, Foundation);
    the strange thing is, it appears random.
    is there any better way to count them without getting random problems?

    thank you!
    sorry for my bad english
     
  2. Here you go :)
    Code:
    var entity = UnityEngine.Object.FindObjectsOfType<BuildingBlock>()
                    .Where(x => x.PrefabName.Contains("foundation"));
                Puts(entity.Count().ToString());
     
  3. thank you so much, i'll try that :)