Autocomplete scriptableobject not showing up

I’m using the latest Visual Studio 2019 with the most recent update, and unity 2019.4.

ScriptableObject and Monobehavior do not have autocomplete snippets for me- however intellisense seems to be working fine for everything else within my code. I’ve tried googling, but all the “fixes” are for enabling basic intellisense options which are already all on for me, in VS or unity being linked to VS in the options. What am i missing?

Possibly, the extension in Visual Studio 2019 didn’t get installed…

1 Like

It seems to be installed from my extensions. The only thing i could think of is that i didn’t “install” it when upgrading to unity 2019.4 from within my unityhub, i saw that there’s no need to reinstall VS again from there. Could that be the issue or is it unrelated?

It’s never been a problem for me, and being a TA, I need to have many many versions of Unity installed (if a student sends me a project to debug, I prefer to use the version of Unity they are). As VS2019 is installed with tools, it just works, generally.
Can you screenshot the Solution Explorer window for me?

Capture

Sorry for delay, was busy with work!
Thanks for the follow up brian on this issue, you’re always a good help both here and on udemy!
Let me know if this screenshots helps you identify the issue in any way.

I just updated the latest release of VS, intellisense seems to be picking up all autocomplete with the exception of some snippets.

The thing I was interested in is if the solution was being properly generated, which it appears to be. I’m not entirely sure beyond that what the issue could be.

If the snippets fail to work (like generally in a Monobehavior I should be able to type “awake, tab” and an Awake method should be generated, try instead pressing Control-shift-M, this will give you list of Unity message (like Awake, etc) to implement.

I don’t have an issue within the monobehavior class, the snippets are loading fine. It’s the snippet for making a ScriptableObject class or monobehavior class that isn’t showing up. I have no snippets for classes.
Sorry if i wasn’t explaining it correctly.

Oh, I don’t believe there are any.

The best I was able to come up with is to type class [tab] which creates a class to name, then type MonoBehavior or ScriptableObject after it.

I figured there was, in all of this course when Sam was creating courses from within VSC he was creating them as empty and getting snippets for monobehavior. The same when he made the scriptableoject scripts for weapon and progression, he got autocomplete with template filled out.

I don’t know if this is a feature only in VSC and not in VS, it can be very useless especially for scriptableobjects since it’s a rather confusing syntax to memorize especially since it’s used much less often than monobehavior in scripts.

Personally, I don’t recommend creating scripts within VS or VSC. When you create a script within Unity, it creates the Meta files that Unity uses to keep track of things and rather conveniently creates a properly formatted MonoBehavior for you. (You just have to change that to ScriptableObject for an SO within the editor). Sometimes Unity gets confused when you rename or create scripts within VS or VSC, as the metadata doesn’t match what it has in it’s records.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms