StackOverflowException on LazyValue

Hi i got this error while doing the navmesh sorting part. it may or may not have anything to do with it. i dont know what causing this

Blockquote
StackOverflowException: The requested operation caused a stack overflow.
GameDevTV.Utils.LazyValue1[T].ForceInit () (at Assets/Asset Packs/GameDev.tv Assets/Scripts/Utils/LazyValue.cs:56) GameDevTV.Utils.LazyValue1[T].get_value () (at Assets/Asset Packs/GameDev.tv Assets/Scripts/Utils/LazyValue.cs:38)
RPG.Combat.Fighter.AttachWeapon (RPG.Combat.Weapon weapon) (at Assets/Scripts/Combat/Fighter.cs:73)
RPG.Combat.Fighter.SetupDefaultWeapon () (at Assets/Scripts/Combat/Fighter.cs:38)

and so on.

Now unity keep crashing everytime i press Play button

the problem seems to be on “AttachWeapon” i typed currentWeapon.value.Spawn() instead of weapon.Spawn()

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

Privacy & Terms