So, I’ve ran into a new kind of bug. Rather than just mess with the game, it freezes the entire editor, and I have to use Task Manager to force quit it and then reopen it. Using Debug.Log, I managed to track it down to stopping at a specific point in my code, whenever a specific if() statement comes up as true.
if (collisionInfo.CompareTag("Wall"))
{
if (collisionInfo.transform.position.x >= gameObject.transform.position.x)
{
canClimbR = true;
}
}
if (collisionInfo.CompareTag("Wall"))
{
if (collisionInfo.transform.position.x <= gameObject.transform.position.x)
{
canClimbL = true;
}
}
for some reason, whenever the trigger I have set up enters a 2D collider attached to a game object with the “Wall” tag, the editor freezes.The weird thing is, it works fine for detecting game objects with other tags, such as “Ground” or “Enemy”.