GithubHelp home page GithubHelp logo

hoavk / unityvisualstudiosolutiongenerator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from joc0de/unityvisualstudiosolutiongenerator

0.0 0.0 0.0 112 KB

Visual Studio Solution Generator for Unity to improve developer productivity when working with multi-package unity projects

License: MIT License

Python 3.18% C# 94.80% PowerShell 2.02%

unityvisualstudiosolutiongenerator's Introduction

openupm main github action workflow MIT license GitHub Release

Unity Visual Studio Solution Generator

Visual Studio Solution Generator for Unity to improve developer productivity when working with multi-package unity projects. This package intercepts the Visual Studio Solution generation done by Unity's Visual Studio C# integration. It preforms the following changes to the solution / project files:

Reduced project hierarchy

Placing projects next to code so the file hierarchy inside Visual Studio Solution Explorer is cleaner.

Solution generated by Unity Solution generated by this package
Solution Explorer with Assets root folder Solution Explorer with only required folders

Allow renaming files from local package dependencies

In the normal Solution generated by Unity projects of local package dependencies are referenced as a Link. This has the side effect that you can't rename the file using Visual Studio. The Visual Studio Solution generated by this package creates the project file (the .csproj) inside the folder containing the local package therefore the .cs files are imported as normal files -> they can be renamed.

Allow generating project file in the new SDK-Style

Currently the C# project files (.csproj) generated by the Unity Visual Studio integration are using the legacy (non-SDK-style) project format normally used by .NET Framework. We provide a option to generate SDK-style project files.

Advantages of using SDK-style projects:

Note: All changes related to the generated .csproj files or settings changes using Directory.Build.props only work inside Visual Studio, Unity build doesn't recognize them. So e.g. analyzer warnings of analyzers configured inside Directory.Build.props are only visible inside Visual Studio, not inside Unity build logs.

Disadvantages of using SDK-style projects:

  • The Visual Studio Unity Plugin doesn't detect the projects as Unity Projects this leads to some changes in the behavior of Visual Studio so e.g. to start debugging instead of Attach to Unity you need to use Debug -> Attach Unity Debugger
    Attach to Unity menu item Debug -> Attach Unity Debugger menu item.

Settings

This package tries to be customizable to match individual requirements. So it has many configuration options, they can changed using the Preferences UI that can be opened directly using the custom menu item Visual Studio -> Preferences or using Edit -> Project Settings -> Visual Studio Solution Generator. All settings are stored per project inside the file: ProjectSettings/Packages/com.github-joc0de.visual-studio-solution-generator/Settings.json. Screenshot of available settings

unityvisualstudiosolutiongenerator's People

Contributors

joc0de avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.