Error log

Note: this will probably only be interesting if you want to be entertained by the errors I’ve encountered while attempting to learn Unity. These errors are not caused by Unity, but by me.

  1. I tried to write a script to tile a texture automatically, but the texture kept stretching it’s Y value to match its X value, to maintain a square ratio. Solution: the code I was using only works with square ratios. This was clearly stated in the tutorial, I just didn’t catch it at first. Now I know! 🙂
  2. I created a script for an animated texture, which threw an error. Solution: I’d ended the script with ;);
  3. Once I’d fixed the animated texture script, the background wouldn’t move. Solution: I had dragged the script onto my quad, but then undone it to fix something else, and had forgotten to re-add it.
  4. Turns out I can animate the texture from error 1. without problem, I was just using the wrong script file. I used the script I wrote for the animated background, and removed the tiled background script, as there was no point of even tiling this texture. Solution: stop over-thinking.
  5. “error CS1525: Unexpected symbol `public'”. Solution: I was actually missing a brace symbol a couple of lines further up.
  6. “cannot supply index [] to objectPool. Solution: I was missing an s: pool = pools [reference];