void HandleTreePossession(GameObject tree) { string rootTree = null; if (!store.treePattern.IsMatch(tree.name)) { return; } rootTree = store.treePattern.Match(tree.name) + "_"; PulseController pC = GameObject.Find(rootTree).GetComponent <PulseController>(); if (pC.GetLastInLine().name.Equals(tree.name)) { placement.UpdateObjectToPlace(store.GetTreeName(tree.name), "tree", store.GetTree(), mouseHit.point); placement.placing = true; } }