• Unity
  • Autocompleting function in Microsoft Visual Studio

Related Discussions
...

Hello. I was following a tutorial that showed an autocomplete function in Microsoft Visual Studio but was not expounded on how it works other than it just should work. Unfortunately it did not for me and when I tried to enter the code manually I don't think Unity liked it. In the attached screen shot, my code is in the top left showing where "AnimationEntry_Complete" should appear. The tutorial on the right and my console output when I tried entering it manually at the bottom left.

My question is how do I get this function to work, was it supposed to be from the Spine Utility Package? Thank you in advance for anyone who can parse this!

TrackEntry's properties should be written in the first letter capitalized. Therefore, line 42 of your code should be

animationEntry.TimeScale = timeScale;

I am not sure why it worked in the tutorial video. (Perhaps the runtime version used in the video was outdated?)

In general we would highly recommend taking a look at the example scenes and scripts that come with the spine-unity runtime, and referring to the spine-unity documentation page, as these are always up to date and not potentially incorrect and outdated as any thirdparty videos on youtube.

render07 a écrit

Unfortunately it did not for me and when I tried to enter the code manually I don't think Unity liked it.

Please also note that you have a spelling mistake as you named your method .._Complate instead of .._Complete, so if you manually spelled AnimationEntry_Complete correctly it for sure will not find that method.

In general always resolve any compile errors from top to bottom of the list, in your case an error in line 42 might have caused follow-up problems (also of auto-completion) in the lines below.

Thank you for the replies! I don't want to take your help for granted on these simple little mistakes. My reading comprehension can be really bad but I want to try new strategies to improve. I appreciate the documentation link. I'll be referring to that for now on.

Glad to hear it has been helpful, thanks for getting back to us.