prime31 / Nez

Nez is a free 2D focused framework that works with MonoGame and FNA
MIT License
1.76k stars 355 forks source link

Use relative path for root assets #751

Closed nrmiller closed 1 year ago

nrmiller commented 1 year ago

The current ContenPathGenerator.tt template spits out a full path for assets in the root source folders:

class Content
{
    public const string Cursor = @"C:\Users\user\GitHub\MyGame\MainProject\Content\cursor.png";
}

This is problematic because now references will not be portable. They should instead be relative. After making the change the generated file now prints the following for assets in the root source folder:

class Content
{
    public const string Cursor = @"Content\cursor.png";
}

Tested on VS 2022 on Windows 11