- Home /
Configure default namespace for C# scripts in project?
I found some mention from 3 years ago that this option was planned for Unity 2.
Project specific configuration including namespace configuration is definitely planned for 2.0.
Was this ever implemented?
Not afaik, but you can change the default C# script. The file used as a template is in Unity/Editor/Data/Resources/ScriptTemplates.
Wrap that file in namespace whatever {}, and you're good to go.
good workaround for a single person and single project. for a $$anonymous$$m this quickly becomes cumbersome.
Oh, and by the way, that thread doesn't say that it wasn't planned for Unity 2, that was planned for version 2 of Visual Studio Tools for Unity, which is a third party plugin that makes $$anonymous$$icrosoft Visual Studio play nice with Unity.
If you use VS with VS Tools, I'm pretty sure that you can set the default namespace of files you create in the editor.
my mistake. I'm looking for both the Unity config and Visual Studio tools. anyway, it appears Visual Studio Tools has not reached 2.0 yet and the feature isn't available either.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Making a bubble level (not a game but work tool) 1 Answer
Using C# .dll that doesn't use namespaces 0 Answers
Problem with using IComparer 1 Answer