VR4RoboticArm2/VR4RoboticArm/Library/PackageCache/com.unity.learn.iet-framework/Tests/Editor/TestBase.cs
IonutMocanu 48cccc22ad Main2
2025-09-08 11:13:29 +03:00

19 lines
658 B
C#

using System.IO;
using System.Linq;
using System.Reflection;
using PackageInfo = UnityEditor.PackageManager.PackageInfo;
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('\\', '/');
}
}
}