unity get bool in a function code example Example: how to system func bool unity Task<bool> t1 = new Task<bool>(() => IsPrime(numberBeingTested));