All posts by Joshua Howard

How To Setup A Github Repo For A Unity Project

If you’re not familiar with using Git you can take a peek at my quick guide Git It? or spend some time browsing the web to get familiar. If you are familiar with Git, you will need to install Git Bash for this tutorial. You can grab a copy of all the necessary install files right here: https://git-scm.com/downloads



The first thing we want to do is setup our new repository on Github. You will need to first create a Github account. Once you’ve created your account, you can click the little plus sign, in the top-right corner of your screen and select ‘New repository.’

This will take you to the ‘Create a new repository‘ screen to setup your new repo. You will need to provide a name for your repository and then select if you want it to be viewable by the general public. In this example, I will keep the repo private.

I do not want to create a ReadMe or .gitignore at this time but I will do so after I have created my Unity project. Go ahead and press that little green button, ‘Create respository.’

Now that the new repo is setup, Github will kindly provide you with some instructions on how to push your new project to this online repo.

Advertisements

But the first thing we need is to setup a new Unity project. I will walk through how to create a new Unity 2D project and then we will setup a .gitignore file to exclude any files we don’t want to include in our repo. Finally we will push all of our changes up to Github.

Let’s walk through the process.

You’ll want to open Unity Hub and create a new project.

Now that the project has been created you’ll want to navigate to the directory where the project has been saved. Once you are in the directory, you can right-click and select, ‘Git Bash Here.’ This will open the git command line.

The first command we want to run is ‘git init‘ this will initialize the git repo locally and allow you to start adding and commiting your unity project for source tracking.

Now that the repo is setup, we can run ‘git status‘ to view the files that we can potentially add to our repo, BUT before we add anything, we want to include our .gitignore file. This will allow us to only include the files we need, and allow us to ignore any temp or unneeded files.

To do this you will need to create a new empty text file and rename it to ‘.gitignore’ so that git will recognize this file as being the one that will tell us which files to ignore.

Now go ahead and open up the file in a text editor and in the contents of the text file we are going to include the files we wish to ignore. You can find a good example of what to include by searching on Google for a Unity .gitignore file or you can use the one here: https://raw.githubusercontent.com/github/gitignore/master/Unity.gitignore.

Advertisements

Once you’ve added that to the contents of the .gitignore file, you can save the file. Back in the git command line window you can run the ‘git status‘ command and see the remaining files we will include in our repo.

We will now run the ‘git add .‘ command which will include all of the files that are not ignored, to be a part of our project.

Next we will run the ‘git commit‘ command which will commit our newly added files to our main branch. We will actually use the ‘git commit -m‘ command so we can include a little message on what these changes are.

After adding our files it’s time to finally push them up to Github. To do this we will run two more commands. The first is the link this local git repo to the one on Github.com. The second is to push the changes from our machine, up to Github.

Github provides the first and second command for you:

Execute the ‘git remote add…’ command followed by the ‘git push‘ command (you may need to change the push command from ‘main’ to ‘master’) and you’re done.

You now have a brand new Unity project on Github. If you’re interested in knowing more on how to work with Git or Github leave a comment!


Dream Big Long-Term, Work Small Short-Term

When it comes to setting goals and trying to figure out how to reach them, I’ve done my fair share of experimenting (you can see some of the strategies here: The ‘I HAVE To’ List).

But of all of the methods I’ve tried, and all of the ones I’ve failed at, there are a couple of things that have stood out as being helpful, across the board.



Dream Big Long-Term

In “Measure What Matters” by John Doerr (which I recommend buying and reading, it’s like a $10 book with about 20 pages in it), he discusses setting objectives, or goals, at a level that requires more than the average amount of effort to achieve. He follows this up by stating that even if a person, or team, only achieves a percentage of their goal, say 85%, that this is still a success.

The thought process behind this is that we too often limit our potential by trying to set reasonable goals… yet it is the unreasonable goals that actually drive innovation and progress. If you’ve ever heard anyone say, “shoot for the moon and you might land on a star”, this is what they are referring to, and it’s more than just a simple saying.

Setting big goals with an aggressive deadline will quickly put you into a different level of drive and this is exactly where you want to be, to achieve your goals.

Advertisements

The thing that trips most people up though, is that they become very impatient to reach their bigger goals. Many people expect to hit the gym for a week or a month and then decide to give up, because they aren’t where they thought they should be. Peoples expectations on how quickly they should find success is terribly misguided and is often the cause of people who give up too soon.

This is what makes Dream Big Long-Term valuable. It tells us to continue to aim extremely high, so that we can continue to innovate and grow, but it also reminds us that we need to be running the race with the tortoise mindset and not expect to reach the finish line so quickly.

You can’t fast-forward to an achievement you haven’t earned.

Work Small Short-Term

While we need Big Dreams to set us on the right path, being a dreamer alone won’t get you where you want to go. And while our expectations should concern the Long-Term, if we’re not making enough happen consistently in the Short-Term, we’ll never get there.

That’s why Working Small Short-Term matters and it’s all about staying consistent, quickly. We can have a goal to win a race, but the only way to reach the finish line is to start taking steps. And the person or team that can show up every day, no matter the obstacles, and take another step, is the one who is going to reach the finish line.

Working Small Short-Term means looking for the Little Victories and trying to obtain as many of them as possible, as quickly as possible. The thing that tends to slow down a lot of people, when trying to reach their goal, is getting too caught up in trying to make the right decision.

Advertisements

Maybe they over think what their workout routine should be, or they spend too much time trying to consider every option out there, and so they burn a bunch of time and energy on just thinking… but the thing is, no one can make the right decision always (unless of course you can predict the future).

Something that might look like a sure-fire, right decision now, might turn out to be a terrible choice 6 months later. You might think it’s a good idea to go to the grocery store, and then get hit by a car on the way. Suddenly that sure-fire choice just took a wrong turn. Life has a funny way of working like this, isn’t it ironic?

The point is, don’t get too caught up in trying to make the right, or even the best decision. Start taking actions and steps that you think might move you forward toward your goals ,and along the way you’ll figure out which choices work most of the time.


Action Wins

Today’s post is my little victory.

It’s not a long post.

It’s not a fancy post.

It’s not a post with some great tips or a life lesson.

It’s just a short post so I can get my little victory in for the day.

Consistency matters most.

3 Key Tips On How To Start a New Habit In 2021

As New Year’s approaches many people are gearing up for their New Year’s Resolutions. Many are hoping that 2021 can be the year of change. The year that takes all the other years and makes them all look like they were worth waiting for.

Yet, there will be many who awaken on a March day in 2021 and find themselves living the same life they were in December 2020. New Year’s resolutions have a way of doing that to us. Setting us up with fantastic goals, only to have the reality of the situation set in a few months later.



But what if, instead of trying to change our lives like we were ripping off a band-aid. We instead told ourselves that we would try to change our lives like someone building a house? That instead of looking to make a sudden and quick change, we would instead opt for the daily actions that would then produce the results of the change over the course of the 2021 year.

In other words, what if we could change ourselves through small daily actions, rather that giant New Year sized ones? I think, from my own experience, that there are a couple of things that we, as people can do differently that can greatly increase our chances of starting a new habit.

Advertisements

Before we can really get started we have to have the vision of our new habit. Like building a new house, you first need to start working on the blueprint. You don’t’ need to have every measurement figured out but you do need to start filling in the gaps of the habit you’re wanting to create.

The flaw most people make in this step is that they over simplifying the requirements and impact of the habit they are trying to start. What I mean is, people tend to forget how their new habit might impact other people or how their environment and daily life are already impacting it.

Consider someone who wants to quit smoking but still wants to go hang out with a group of friends who are all smokers. In this case the environment is already trying to encourage you to make a choice to smoke. Someone without this same environment will stand a much better chance of actually quitting.

When we’re laying out the blueprint of our change, we need to try and consider all of the other people involved. What will people say? What will people ask you? Is there anything in our environment that is already presenting a challenge to this habit? The more challenges and obstacles you identify in your blueprint, the better and more resilient your house is going to be.

We don’t have to have a completely finalized game plan either. Some people like to wait until every details is analyzed and provided but that’s not nearly as effective as making an initial blueprint and then getting started. We just want to try and find as many “got ya’s” as we can.

Advertisements

Now that you have a blueprint it’s time to put things into action. The next flaw that most people make is that they exhaust 100% of their motivation and will power in week one.

They sign up for a gym membership, buy new gym clothes, and plan out an entire week of meals and exercises. Maybe they sign up to a new program or meal prep all of their meals on Sunday. They try to do as many things as they can to ensure they are successful the next day when the alarm goes off…

But this is a broken strategy. This strategy suggests that you’re always going to be feeling as motivated as you do when you first started. It does jack shit for accounting for what the world is really going to be like. If it takes the coming of a whole New Year just to get you to do all of this shit in the first place, is it really then feasible that you’re going to keep doing all of this again 3 months from now?

The reality is that the world is going to give you flat tires and rainy days and the New Year’s sunshine attitude isn’t going to get you more than another subscription cost to your monthly budget in the end.

What we should be doing here is trying to build our house over the next year by laying one brick every day. Every day we should aim to lay at least one brick that moves us toward our habit. If our new habit is to lose weight, then we can lay a brick of eating a salad for lunch once a week. We start there. Once a week, very easy to accomplish, and we lay that brick.

Then after week 2 or 3, we decide to go for walks on Saturday’s also. Remember we have our blueprint for what we really want, but we’re just laying one brick at a time as we build out the design.

The reason we do this is because we want to spread out our motivation and we want to have the ability to adjust our strategy if we find that salads on Wednesday’s don’t work, because there’s a company lunch, but salads on Tuesday and Thursday do work.

Advertisements

Finally, at the end of the day, no matter how well you plan or how motivated you are. No matter how many little bricks you try to lay, if the foundation of your house is no good, in the end, it will fall.

The foundation of your house is the ‘Why‘ to what you’re trying to change about yourself. Why are you trying to lose weight? Why are you wanting to quit smoking? Why are you trying to be a better father, mother, brother, sister, son, or daughter? Why are you trying to start this new adventure?

If the answer to your ‘Why‘ question is because you want it for you. You will eventually fail. The best reason I can explain for this is because life has a way of challenging us in a way that simple self gains aren’t enough of a force to push us past those really tough moments. Think of the person who works hard to provide for their family versus the person who just wants to make a quick buck. Whose got the greater motivator?

So take all three pieces of advice, layout a blueprint for where you want to go in the next year, start laying a small brick every day, and find a reason for doing it that’s greater than doing it for yourself. If you can combine all three, you’re much more likely to actually achieve that New Year’s Resolution.

Best of luck to everyone out there that’s getting ready to start their resolutions!


How To Create a Glow Effect In Your Unity 2D Project

This process took me entirely too long to actually figure out how to do myself. I even spent a couple of bucks on an solution off the Unity Asset store and still struggled.



I wanted to write this tutorial for anyone else that might want to add glow effects to their projects and to hopefully avoid them having to ride the struggle bus like I did. Take a peek at the end result here:

Play the game right here!

To get started, create a new Unity 2D project. Once created, open the Package Manager under the Window menu item and search for the Universal RP package, install it.

In the Project view, right-click and select “Create >> Rendering >> Universal Render Pipeline >> Pipeline Asset (Forward Renderer)”

This will create 2 objects, name the first object 2D Render Pipeline and delete the object named 2D Render Pipeline_Renderer.

Advertisements

Right-click in the Project view again and select “Create >> Rendering >> Universal Render Pipeline >> Pipeline Asset (Forward Renderer)”

Rename this object to 2D Renderer. You should now have two render objects like this:

Click on the 2D Render Pipeline object and in the Inspector, drag the 2D Renderer object into the Renderer List. Also check the HDR checkbox under Quality.

Now under the Project Settings which can be found under “File >> Build Settings >> Player Settings” select the Graphics tab and set the Scriptable Render Pipeline Settings to the new 2D Render Pipeline object we just created.

Under the Main Camera Inspector you will see some new options, check the box for Post Processing under the Rendering drop down.

If you want, you can change the background of the camera to black to help add to the glow effect.

Advertisements

In the Hierarchy, right-click and create a new 2D Sprite. On the Sprite Renderer of the new object, select the Knob sprite (or provide your own).

Also on the Sprite Renderer, set the Material option to Sprite-Lit-Default (you will have to click on the little eye, to show all of the options).

Now all you have to do is add a Light object to your new sprite and viola, he shall GLOW!

You can play around with the effect of the glow by tweaking these settings on the Point Light 2D

If you want to watch the live stream of the making of this tutorial you can check it out here: Twitch Live Stream or you can catch the shortened version on YouTube!


There Is No Finish Line

How many goals have you set and achieved?

What does your success ratio look like?

If it’s anything like mine, it’s about 2:9843455….

So why is achieving our goals so difficult? Well there can be a number of different reasons, but I think that ultimately there is one key flaw in our goal setting that is holding us back and I don’t think it has anything to do with the goal itself.



Have you ever asked yourself what would happen after you’ve reached your goal?

Let’s say you wanted to lose some weight. You sign up for an 8 week program, you do that program, you lose some weight… and then what?

What happens after that 8 weeks?

Advertisements

What happens after you’ve reached your goal?

This is the area of time I don’t think enough people consider when they are setting their goals. What happens AFTER you’ve reached your goal? Well if you go back to behaving like you did prior to starting your goal…

Guess what’s going to happen to your weight…

People tend to be terribly short-sighted when it comes to goal setting. It’s just a natural part of who we are as human beings. We’re quick to jump on a new strategy or plan if we think it will get us to our goal faster but we’re not stopping to consider what happens if we actually reach that goal and we’re especially not considering what happens after.

What we’re really missing some perspective on, is the journey towards the goal.

It’s not the goal that gets us in shape, it’s the pursuit of that goal that gets us in shape.

It’s the journey that gets us in shape.

David Goggins, one of the most intense athletes I know, once said,

“An NFL football player comes up to me and says, “Goggins can I ask you a question? How do you keep that dog mentality?”

And I said, “Let me ask you a question? When you were younger, what did you want to be?”

He said, “An NFL football player… but once I got there I lost that dog mentality…”

He had a finish line in his brain. Guess what, a true dog mentality…

I have a dog at home, he never gets full.”

You see even those that can achieve amazing accolades, those that can reach the peak of athleticism, can reach their goals and not know what to do next.

This is the same mistake many people, including myself, make when setting their own goals. Our mind is too far spent thinking about the finish line, and not about the journey.

Advertisements

The journey is really where we should be putting our time and effort in to.

But yes, we do still need a goal. A goal sets us on the journey. It gives us a direction, but the goal should only give us the direction. It should only be to point us to where we want to go, it shouldn’t be a finish line.

So the next time you set a goal, don’t set one that has a finish line. Set one that is grossly unachievable (Setting Big Goals: What Do You Want To Be When You Grow Up) and then spend your time focusing on the journey.

Don’t worry about ever trying to achieve your goal, worry about what you’re doing today, that is taking another step on the journey.

Go all in on the journey and never stop walking the path!