Hey Guys, I wanted to make an Player Controller for a 2D Plattformer. But i keep getting the CS 1061 Error. Here is my code: PlayerController.cs Error CS 1061 (Unity 5) - Pastebin.com
Error is in the following lines; 33,45 and 35,27.
Full Error: Assets/Scripts/PlayerController.cs (xx,xx): Error CS1061: Type ´UnityEngine.Transform´ does not contain a definition of ´localScale´ and no extension method ´localeScale´ of type ´UnityEngine.Transform´ could be found (are you missing a using directive or an assembly reference?)
I wonder why I can not make transform.localeScale, because I see on google and in a YouTube Video, where I typed the full correct code from this guy, that it worked
YouTube Video (german, you can see the code at 20:22): https://www.youtube.com/watch?v=HebQN8RbgVU
It would be very helpfull if anybody could help me. Please dont laugh at my if I make any little mistake, because I’m new in Unity and C#
oh. Try GetComponent<Animator>().enabled = false it will make the character not move a single inch
– LaikenYour problem here was probably that you did if (health = 0) { //allow to move } When you should of done: if (health > 0) { //allow to move } especially if your 'health' variable is a float, it is probably not exactly = 0. If the above still does not work, you have a serious 'bug' :) Even though my previous answer that you accepted seems better, I wanted to clarify that @Laiken answer was good too.
– GrKl