DotRecastNetSim/src/DotRecast.Recast.Demo/Program.cs

34 lines
945 B
C#
Raw Normal View History

2023-03-18 18:09:36 +03:00
using System.IO;
using DotRecast.Core;
2023-03-18 22:36:31 +03:00
using Serilog;
2023-03-18 18:09:36 +03:00
namespace DotRecast.Recast.Demo;
public static class Program
{
public static void Main(string[] args)
{
2023-03-18 22:36:31 +03:00
2023-03-18 18:09:36 +03:00
var path = Loader.ToRPath("dungeon.obj");
path = Path.GetDirectoryName(path);
if (!string.IsNullOrEmpty(path))
{
var workingDirectory = Path.Combine(path, "..");
workingDirectory = Path.GetFullPath(workingDirectory);
Directory.SetCurrentDirectory(workingDirectory);
}
2023-03-19 08:39:44 +03:00
Log.Logger = new LoggerConfiguration()
.Enrich.WithThreadId()
//.Enrich.WithExceptionDetails()
.Enrich.FromLogContext()
//.Enrich.WithMethodFullName()
.MinimumLevel.Verbose()
.WriteTo.File("logs/log.txt")
.WriteTo.Console()
.CreateLogger();
var demo = new RecastDemo();
demo.start();
}
}