Game can't find content #174
Answered
by
SoloByte
a-a-GiTHuB-a-a
asked this question in
Q&A
|
Hi! I'm on MacOS and trying to make a small game. The relevant directory structure looks something like this:
protected override void LoadContent()
{
Logger.LogInfo("Loading content…");
contentManager = new ContentManager("Resources");
if (contentManager.TryLoadFont("Resources/Fonts/JetBrainsMono/JetBrainsMono-Normal.ttf", out var defaultFont))
{
Logger.LogInfo("Loaded default font JetBrainsMono Normal");
fonts.Add(FontIDs.Default, defaultFont);
fontNames.Add("Default");
} else
{
Logger.LogInfo("Loaded default font???");
fonts.Add(FontIDs.Default, defaultFont);
fontNames.Add("Default");
}
if (contentManager.TryLoadFont("Resources/Fonts/JetBrainsMono/JetBrainsMono-ExtraBold.ttf", out var jetMonoBoldFont))
{
Logger.LogInfo("Loaded font JetBrainsMono Extra Bold");
fonts.Add(FontIDs.JetMonoBold, jetMonoBoldFont);
fontNames.Add("JetBrainsMono Extra Bold");
}
if (contentManager.TryLoadFont("Resources/Fonts/JetBrainsMono/JetBrainsMono-Regular.ttf", out var jetMonoRegularFont))
{
Logger.LogInfo("Loaded font JetBrainsMono Regular");
fonts.Add(FontIDs.JetMonoRegular, jetMonoRegularFont);
fontNames.Add("JetBrainsMono Regular");
}
}However, none of the resources in the method actually load, instead giving errors that look like this: Any ideas on how to fix this issue? |
Answered by
SoloByte
Jun 15, 2026
Replies: 1 comment 1 reply
|
Hi there, thank you for trying out Shape Engine :) My first question would be if you are copying the resource folder to the output directory? |
1 reply
Answer selected by
a-a-GiTHuB-a-a
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there, thank you for trying out Shape Engine :)
My first question would be if you are copying the resource folder to the output directory?
In your project file (.csproj) is there something like this: