P
P
piffo2020-05-03 21:50:49
C++ / C#
piffo, 2020-05-03 21:50:49

Setting up Visual Studio Unity?

Let's say I write some kind of built-in method (MonoBehaviour), VS already understands what method I want to write, and offers to write it for me, I press enter, and it writes like this

private void OnMouseDrag()
    {
        
    }

Is there a way to make it write like this?
void OnMouseDrag()
    {
        
    }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Muravyov, 2020-05-03
@piffo

If you write without private / public, then Unity will assume that it is private by default. So I see no reason to change something, because the code will not start working differently. And also the readability of the code increases, you can immediately see which methods are public and which are not.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question