public bool Search(out LVector3 found) { found = LVector3.Invalid; if (lookingForBlock || true) { RaycastResults res; for (int i = 0; i < 50; i++) { if (PhysicsUtils.CustomRaycast(transform.position, Random.onUnitSphere, 20.0f, (b, bx, by, bz, pbx, pby, pbz) => { return(true); }, (b, bx, by, bz, pbx, pby, pbz) => { return(DesiredBlock(b)); }, out res)) { found = res.hitBlock; return(true); } } } else { Debug.Log("not looking for block but called search?"); } return(false); }