itch.io is community of indie game creators and players

Devlogs

Unblocked!

The Bacon Game
A downloadable game for Windows and macOS

Ran into an annoying InvalidCastException recently – turned out that I had changed the type of a node from Node2D to Camera2D but without updating the attached script from 

public partial class CameraMovement : Node2D

to

public partial class CameraMovement : Camera2D

This meant that when I would "get" this object, either by direct reference, or a helper method like GetViewport().GetCamera2D, it would fail the cast and spam an exception every frame.

It took me a while to spot it, partly because I'm working on this project so sporadically so I had completely forgotten the node type change, but it was a quick fix at least!

New build runs as expected, at last! Feel much better being unblocked.

Files

  • The Bacon Game 123 MB
    Version 0.2.3
  • The Bacon Game 72 MB
    Version 0.2.3
Download The Bacon Game
Leave a comment