This question was
closed Oct 26, 2016 at 05:40 AM by
EpsilonQoppa for the following reason:
I'm just a moron <3
Question by
EpsilonQoppa · Oct 26, 2016 at 05:46 AM ·
debug
My if-statement is returning true but it's not processing the code inside the brackets..
So, I've created some debugging code to figure out what's going on. The issue I'm having is that the bool is producing true but it's not hitting the next debug.log statement.
internal static void ProcessCellCollision(CellState x, CellState y)
{
if (y.gameObject.GetComponent<ComputerControls>() != null)
{
Debug.Log("Controls Are Inactive?");
Debug.Log((y.gameObject.GetComponent<ComputerControls>().Active == false).ToString());
if (y.gameObject.GetComponent<ComputerControls>().Active == false)
{
Debug.Log("Checking " + x.gameObject.name + " For Player Controls!");
if (x.gameObject.GetComponentInParent<PlayerControls>() != null)
{
x.AbsorbCell(y);
Debug.Log(String.Format
("{0} Consumes {1}", x.name, y.name));
}
}
}
}
debuglog.png
(16.3 kB)
Comment