Hi!
I have a serious problem with my Singleton.
I have “Skills” gameobjects, they have Image, Button and Skill Component.
In Skill Component I keep data like id, cooldown, damage etc.
It’s on my “Start Scene”
When the game starts I simply load skills values from XML - if no XML then I do a little magic and in the parent of all gameobjects with “Skill” Component I do
someparent.GetComponentsInChildren<Skill>()
This way I save all skills to XML.
Loaded skills I keep in singleton in AllSkillsList.
It has dontdestroydOnLoad, but when the next scene loads, Elements (Skill type) of the list are null.
List still have right amount - but objects in it are null.
What could cause that?
Could you debug this line like this. If the output is false, then the point the agents wants to move to, is not on the navmesh. Debug.log(agent.SetDestination(currentDest.transform.position));
– Oribow