Generate Method Quick Command

In Section 2 - Lecture 18, @ben is demonstrating how to auto-generate a method with a Right mouse click, but he is on an Apple OS during this portion of the lecture.

Here’s how I was able to do the same thing Ben does, on a Windows 10 PC, using Unity 2017.

First Process:

  1. Hover your mouse over the unassigned function, and a light bulb with a drop-down arrow will appear.
    Generate Method01

  2. Click the drop-down arrow, and select “Generate Method.”

  3. You can also RIGHT CLICK the unassigned function, and a menu system will appear. Select “Quick Actions,” at the top of the menu.
    Generate Method03

  4. Click the drop-down arrow, and select “Generate Method.”

Thanks for showing us the neat shortcut, @ben.

-Goodge

4 Likes

Thanks for sharing!

Hey, I have no light bulb on the left hand side and when I click on ‘Quick Actions and Refactorings’ it says there are no quick actions available. Any idea how I enable this feature as it seems very useful!

Alt-enter when your input cursor is on a piece of text is also a handy way to get the drop down instead of right clicking or having to use the mouse at all.

Also if anyone is really sure they want to use Visual Studio for the long run, check out ReSharper. It’s a huge improvement over the built in intelllisense. I learned about it from the Mosh C# courses on Udemy. It’s free for 30 days, then it’s like 15-20 bucks a month (after paying for a year you can keep the version you are on but unless you keep subscribing after a year you won’t get more updates)

Honestly, I was hooked after 30 days and it’s currently the only game development/programming tool I have paid for so far.

Privacy & Terms