A very Minecraft break

“I’ve just sucked 5 years of your life away. How does that make you feel?”

The Pit of Despair from the Princess Bride Been playing Minecraft as a break from the Cowboy game.  Five days of intense hoard/build mode (aka “hamster-ing”) with the rest of the team, but I think I’m dropping to an equilibrium with it.


Back to the Cowboy game though. I’m using Protopack 1.3 for quick models just for testing purposes.

Unity Error: Argument is out of range. (Tut57-59)

During tutorial 57, if you hit tab after generating the spawn points for the Slugs, you will get an error. I looked for a way to fix it for a while, but it was covered in tutorial 58 (unknown to me at the time).

ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index

Read the rest of this entry »

Programming Error: Unreachable Code Detected

This is generally when there is a fragment of code that can never be accessed under any circumstance. It’s a very general category. It might happen if you create an infinite loop that has code after it – since it’s infinite, it will never end to execute the next line. It can also happen if there is an impossible if/else, switch or other control structure. “Impossible” does not allow for any circumstance where it can happen. It is logically impossible.

while(true) {

Read the rest of this entry »

Unity Error: ListenerException

ListenerException: Attempting to remove listener for type player health updated but Messenger doesn't know about this event type.

Messenger is trying to remove a listener, but it doesn’t recognize the one you passed it. This means that either it wasn’t told about the listener that you are sending it, or you have a typo.

Non-programming explanation:
You have a package at UPS with the tracking number #1000000 (your Listener) and you want to pick it up from UPS (Messenger). You go to the UPS store and tell them the tracking number is #1888888 by accident, but they cannot find your package, so they keep your real package in the back (your Listener is not removed).

Messenger.AddListener("status", OnChange);
Messenger.RemoveListener("statussss", OnChange);

Read the rest of this entry »

Programming Error: Cannot implicitly convert type `float’ to `int’.

error CS0266: Cannot implicitly convert type `float' to `int'. An explicit conversion exists (are you missing a cast?)

This often happens when ints are used in an equation that would yield a non-int, such as a decimal (float). In the example, 100/3 is 33.33333, which is being stored in an int. An int cannot store decimals, you need a float or double for that.

int var = 100/3;

Read the rest of this entry »

Unity Error: No 'Renderer' attached to game object.

MissingComponentException: There is no 'Renderer' attached to the "mob_Slug" game object, but a script is trying to access it.

You probably need to add a Renderer to the game object "mob_Slug". Or your script needs to check if the component is attached before using it.

From Tutorial 51: Targetting 2.0 part 1

mob_Slug1 has an animation and a mob, but not a Renderer. It’s looking for a renderer because we are changing the color, and in order to get that material you have to go to the subfolder in the mob called Sphere, which holds the texture.

selectedTarget.renderer.material.color = Color.magenta;

Read the rest of this entry »

Tut43: Extra exercise.

Following along with BurgZergArcade’s tutorials. As part of a series of commentary, here’s a homework assignment aimed at introductory level programmers.


Can you change your log statements in GameMaster.cs for the Spawn Point to say the following?:

Created: Player Spawn Point

Moved Player Spawn Point to (50, 5, 100)

Where “Player Spawn Point” is not a string. This should be the value that you entered in the constant! The numbers should be the x, y and z of your spawn point.

Read the rest of this entry »

HnS 33: Commentary

In this tutorial you are supposed to import a model as a .fbx. Firstly, you need to get the model. That’s on BurgZergArcade’s website in the Assets -> Models -> Humanoids, it’s free but I think you do have to make an account there.

Read the rest of this entry »

Commentary: HnS #29 Saving Character Data

On the Unity documentation page for PlayerPrefs it says:

PlayerPrefs are stored in the registry under HKCU\Software\[company name]\[product name] key

This is in your registry. So on Windows 7, go to Start -> Type regedit.
Read the rest of this entry »


Here’s a link to Sprite Manager 2, I haven’t tried it yet (it costs $150 so I’m going to watch videos for it before I decide).

Here are some extra GUI Skins from the Unity3D site. There is also a thread on their forum with more skins.

« Older entries Newer entries »