An easy to use Unity 3D library for creating illustrated Interactive Fiction games and more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
641 B

using System;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public class IntegrationTestAttribute : Attribute
{
private readonly string m_Path;
public IntegrationTestAttribute(string path)
{
if (path.EndsWith(".unity"))
path = path.Substring(0, path.Length - ".unity".Length);
m_Path = path;
}
public bool IncludeOnScene(string scenePath)
{
if (scenePath == m_Path) return true;
var fileName = Path.GetFileNameWithoutExtension(scenePath);
return fileName == m_Path;
}
}