Unity 2D RPG: Complete Combat System - Nullref error

,

@Brian_Trotter
Getting a Nullreference error for object in scene. I am in Section 3 Step 14. Sword Animation. I have checked everything I can think of and even custom ordered the script execution and I still get this error.

Error:

Sword script:

Player object hierarchy:
player_hierarchy

Player component tree:

ActiveWeapon component tree:

Sword component tree:

@Brian_Trotter

So out of nowhere I am no longer getting this error. I suspect after I restarted Unity it must have cleaned up some cache or something that the Unity framework was mistakenly reporting an error incorrectly? I am using the new Unity 6 LTS version so I suspect it must be a bug.

Ah, the Edge Wakeup bug… this one has been persistent and persnickity in Unity for a couple of YEARS. Generally speaking, a restart fixes it for a time, but often the best fix is to reset all of the layouts (which of course, trashes any custom layouts you may have).
In terms of the game itself, this bug does nothing but annoy completionists (like me) who like to see no red or yellow messages in the console. It doesn’t affect game play or builds.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms