Unity Tidbit: WaitUntil, WaitWhile

If you’ve been working with Unity for any sort of while you’ve probably used Coroutines before. They’re not exactly the bread and butter of using Unity but they’re like the jam or honey you put immediately after. You’ve probably used a lot of “yield return null” to wait for the next frame before resuming execution? I bet you even have used a “yield return null” loop to check a predicate every frame before continuing. I’ve done it myself. I’ve even written a repeating coroutine helper that uses null to check a predicate before running a given action. Well… stop that. Recently (and by ‘recently’, I mean at least a year) Unity now has two new conditions you can use in coroutines: WaitUntil and WaitWhile and they do exactly what you think they do. Just use any of these two instead of your usual “yield return” and put in a function (even a lambda) that returns a boolean then the coroutine will handle the checking by itself. It’ll check every frame if the predicate is fulfilled and will break if it is or isn’t, respectively. The underlying code this represents is exactly the same like you wrote yourself before but now your code can be a lot more elegant. You’re welcome.


Posted in IT, No Category, Programming and tagged , , , by with comments disabled.

Day 14-15: Ice Cream is Actually Kind of Fine

I still feel kind of stuffed most of the time and I think I’m eating well underneath the average calorie requirement for the day. Weight has actually stayed quite the same as before. I have been quite tired lately, just crashing when I get home. Though, yesterday, I can probably explain it with a sugar crash. It was happy hour at work and I did have one ice cream cone. I saw it’s only 22% carbs. Which is not great but not horrible. The bitter chocolate I have is more than that. Though it was still 11g of sugar so that was probably overwhelming to my system right now. This weekend, there is a lot of meat in my future.


Posted in Me, No Category by with comments disabled.

Day 13: Stress at Work is Done

The thing is working and I think we all deserve a cookie. A very low carb, tasty cookie. Anyway, I decided to aim low on yesterday’s lunch and just bought a bunch of cold cuts, a pepper, a cucumber, and an avocado. And I didn’t eat the avocado. At home, I hate a couple strips of chicken, a handful of peas, and my bread with cheese. I woke up today still feeling stuffed. Maayan told me to just eat the Avocado for lunch. I’ll probably still get another meat-like device but I think I’ll do what she says. She’s still planning on making burgers, I think.


Posted in Me, No Category by with comments disabled.

Day 11-12: Stress at Work Continues

Why is that pertinent? Because I had ice cream and I felt like I really needed it. Also, I’ve been waking up in the morning feeling stuffed. Meaning I’ve been eating too much at dinner. I don’t like that feeling. Makes me think about the hunger/life-expectancy experiments and maybe I should get used to being slightly hungry and skipping the idea of a standard meal.


Posted in Me, No Category by with comments disabled.

Day 9-10: Just a Weekend

Just staying at home as Maayan went to see her friends. Had a big salad, a bag of Schwarma and not much else. Did watch Morbius with a batch of Popcorn yesterday. Still conflicted about it. Popcorn is kind of carbohydrate rich but considering how filling it is… I don’t now.


Posted in Me, No Category by with comments disabled.

Day 7-8: My Stomach Has Shrunk

For the last few days it feels like my stomach has shrunk three sizes. Right now, if I have a big enough lunch, I can barely eat anything for dinner. Yesterday I ate two slices of sausage for breakfast which held me almost to lunch, had two vegi-schnitzels and two sausages for lunch, a handful of pistachios, and three actual schnitzels and a slice of bread for dinner. And that made me a bit stuffed. I don’t know exactly what’s going on but I’m almost never actually hungry during the day now.


Posted in Me, No Category by with comments disabled.

Day 6: Doing an Experiment

Found, among the various things I can order for lunch, a salad that comes with a burger. Added omelet on top and it was a nice lunch. Stole some salad and kebab from coworkers and then I ended up with some bread and cheese for dinner. The point is I ordered two lunches (which was kind of cheap per) and saved one for tomorrow. That’s how I order cheaply and get over the order minimum.


Posted in Me, No Category by with comments disabled.

Day 5: A Bit Bad

I totally lost control yesterday and… at an icecream cone. I’m telling you, this job is having a bad effect on me. 😛 There were also Kabukim so I had a handful of that. But I did eat my salad. Today I’m thinking about ordering lots of meat for lunch and then saving some for tomorrow.


Posted in Me, No Category by with comments disabled.

Day 3-4: I’m Good

Made salads, cooked meats, made an omelet, loafed another loaf (with cocoa powder and some sweetener) and I’m feeling pretty good. If a bit tired.


Posted in Me, No Category by with comments disabled.

My Keto Almond Bread Recipe

Speaking of bread, here’s what I use. Disclosure: This is the original I used. These amounts are 150% of original capacity because it fits me better. Values Taste: Addicting, considering. Serving: 1 Loaf; Calories: 123kcal; Carbohydrates: 5g; Protein: 4g; Fat: 10g; Fiber: 3g; Net Carbs: 2g; Work time: 15-20 minutes Prep Cup, ½ cup, ⅛ cup, ½ tbsp, ½ tsp Big bowl, fork Ingredients 3 cup Almond Flour ⅜ cup Psyllium husk powder ⅜ cup coconut shavings 1½ tbsp baking powder ½ tsp salt 6 large Eggs (beaten) ⅜ cup Coconut oil (measured solid, then melted) 1½ cup Warm water Directions Mix all the dry ingredients in a large bowl Start oven on 180 degrees Add the eggs and melted coconut oil and mix them in Then add the warm water and mix well to avoid air bubbles Pour the batter into the bread mold Bake for 55 minutes (a toothpick should come out clean and the top should be hard). Let it cool completely (about 10-15 minutes).


Posted in Mixing by with comments disabled.