Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

Can't get (added) components from Empty Object, Animator giving me a hard time.,Can't get (added) components from Empty Object, animator get's on my nerves.

$
0
0
Hello guys ! I have created an empty object in my game and added it a bunch of components. I am trying to access them from a script inside the object with the GetComponent<> function but when I try to use said components later on in the script I get a NullReferenceException . Why is that ? To elaborate a bit more I wanted to create a copy of my player character and change it's sprite and animation, my problem was that I could not get it to work with a new animator controller. I changed the controller inside the animator component and put inside the new animation I made . I tried this twice: The first time in-game when the animation was triggered it played the old animation. The second time it replaced the old animation with the new one so my old player character wasn't working. Any help on that part as well ? I feel Unity's animator is really bad... with all the double clicks and the settings that are hard to access... Anyway sorry for the long post and thanks for your help !

Viewing all articles
Browse latest Browse all 2891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>