To view this content, you must be a member of Terresquall's Patreon at $5 or more
Already a qualifying Patreon member? Refresh to access this content.
If you are running a small business and currently using a @gmail.com address, check out our new Virtual Email Hosting service. It maps a custom email address onto your existing Gmail mailbox, so you get to send and receive emails using the new address whilst keeping the same Gmail mailbox — no migrations needed.
Page content continues below:
There are 2 comments:
After completing this tutorial when I launch I get a unity pause with the issue –
*NullReferenceException: Object reference not set to an instance of an object*
In reference to this line – List landData = LandManager.farmData.Item1;
Then when I un-pause unity it runs fine.
Hi Corey, for Unity pausing on error, it’s because you enabled Error Pause in the Unity Editor: https://answers.unity.com/questions/737305/unity-pausing-when-runtime-error-occurs.html
As for the NullReferenceException, whenever you get this, what you want to look at are at areas where you have a chain of full-stops (.), because what it is saying is that one of the objects you are referring to in the chain is null.
In your case, it can mean that LandManager.farmData is null, or LandManager.farmData.Item1 is null. You can check if either item is null by doing a print before the line:
Once you find which is the null item, ensure that it is filled and the error should go away.