What I am trying to do is the have a trigger object at the end of different levels and when the player gets inside an animation plays, and then the next scene is loaded.
problem is when I add components like animator, when the scene is changed the reference to the component is missing, it is showing in the inspector and in the debug.log, but error log says it is destroyed.
and I cant use dontdestroyonload bc the position of the trigger will be different in all levels.
How can I manage this? Thanks