Simple script that automatically loads your C# project when your Unity project is opened!
Create a Monobehaviour script called "OpenProject" in an Editor folder of your Unity project. Use the code below and next time your project is loaded, the "Assets/Open C# Project" menu option will be called to open your C# project automatically, saving you all of 2 clicks!! (if it does not you may need to bring the Unity window into focus).
using UnityEditor;
/// <summary>
/// Auto open C# solution on project load! Place in an Editor folder
/// </summary>
[InitializeOnLoad]
public static class OpenProject
{
static OpenProject()
{
// Ensure this runs only once per session.
if (SessionState.GetBool( "openedproject", false ))
{
return;
}
SessionState.SetBool( "openedproject", true );
// Use delayCall to safely execute the menu item after initialization.
EditorApplication.delayCall += () =>
{
EditorApplication.ExecuteMenuItem( "Assets/Open C# Project" );
};
}
}