VR4Medical/ICI/Library/PackageCache/com.unity.learn.iet-framework@4bd5247958fc/Tests/Editor/TestBase.cs
2025-07-29 13:45:50 +03:00

17 lines
612 B
C#

using System.IO;
using System.Reflection;
using UnityEditor.PackageManager;
namespace Unity.Tutorials.Core.Editor.Tests
{
public class TestBase
{
// Returns the correct path (forward slash used as the separator) depending whether we're running the tests locally or as a separate package.
protected static string GetTestAssetPath(string relativeAssetPath)
{
var packagePath = PackageInfo.FindForAssembly(Assembly.GetExecutingAssembly()).assetPath;
return Path.Combine($"{packagePath}/Tests/Editor", relativeAssetPath).Replace('\\', '/');
}
}
}