I know there are at least a few people with programming experience who read this blog, so I thought I would run something past them.
Earlier I ran into a problem while scripting in C#–the code compiled, but it didn’t produce the in-game effect I expected. (Specifically, an OnTriggerEnter2D method didn’t trigger, even though the code and all in-editor settings appeared to be correct.) I tracked the problem down to a single line, but couldn’t find any issues with that line. Finally, lacking any better ideas, I deleted the line and retyped it, character for character. Just like that, the problem was resolved.
1. What might have caused this issue? I suppose the most likely answer is “there was a typo in the line after all,” and that’s certainly possible–I had been staring at the code for a long time when I finally narrowed the problem down. Are there other possibilities?
2. Normally I want to treat situations where a problem came up and had to be solved as learning experiences. If we never figure out specifically what happened here, what lesson do you think I should take away?