Ok, I’m executing this code:
_gameData.Initialize();
var mission = _gameData.Missions.ElementAt(0);
Debug.Log("Mission is: " + mission.Details.MissionText);
if (mission == null)
{
Debug.Log("Mission is null");
return;
}
Debug.Log("Mission is: " + mission.Details.MissionText);
And I get this output:
How in the world is that possible? Where’s the logic?
How am I supposed to make null checks now? And how will null propagation from C#6 work with this?