2D-Character-Controller icon indicating copy to clipboard operation
2D-Character-Controller copied to clipboard

Serialized fields acting up?

Open eliasg13 opened this issue 5 years ago • 0 comments

When using the script as it is provided, the transforms for ceiling and ground checks, as whell as the layer mask return this error from the editor:

Assets\CharacterController2D.cs(11,43): warning CS0649: Field 'CharacterController2D.groundCheck' is never assigned to, and will always have its default value null

Of course, I have already assign them a transform and setted up the layer masks, but, iven when it's shown on the editor, the error persists. This causes the crouchbehaviour to always be activaded.

I have managed to make it work by un-serializing those lines and setting them to public.

Tested on Unity 2018 .3.11f1

I do not know why or what's wrong with the original tho... Cheers

eliasg13 avatar Apr 01 '19 05:04 eliasg13