Forum begins after the advertisement:


[Part 8] Null Reference Exception issues

Home Forums Video Game Tutorial Series Creating a Farming RPG in Unity [Part 8] Null Reference Exception issues

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #11569
    Jonathan Teo
    Level 18
    Moderator
    Helpful?
    Up
    0
    ::

    Null ReferenceException: Object reference not set to an instance of an object in RegrowableHarvestBehavior with ‘parentCrop.Regrow();’ Do a Debug.Log of parentCrop after the line with the error, you should find that the parentCrop object is null. That is what the NullReferenceException is highlighting.

    You can check if the parentCrop is destroyed or missing on the Inspector as you are playing your game in the editor.

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.

Go to Login Page →


Advertisement below: