|
|
|
|
|
|
public static Dictionary<string, string> renderPipelineScenesFolder = new Dictionary<string, string>() |
|
|
|
{ |
|
|
|
{ "HDRP", "HDRenderPipeline/Scenes" }, |
|
|
|
{ "LWRP", "LightweightPipeline" } |
|
|
|
{ "LWRP", "LightweightPipeline/Scenes" } |
|
|
|
}; |
|
|
|
|
|
|
|
// info that gets generated for use
|
|
|
|
|
|
|
public string relativePath; |
|
|
|
public string templatePath; |
|
|
|
public int frameWait; |
|
|
|
public int sceneListIndex; |
|
|
|
|
|
|
|
public override string ToString() |
|
|
|
{ |
|
|
|
|
|
|
public static IEnumerable GetScenesForPipeline(string _pipelinePath, bool fixtureParam = false) |
|
|
|
{ |
|
|
|
#if UNITY_EDITOR
|
|
|
|
var absoluteScenesPath = s_Path.Aggregate("Assets", Path.Combine); |
|
|
|
string absoluteScenesPath = s_Path.Aggregate(s_RootPath, Path.Combine); |
|
|
|
var filesPath = Path.Combine(absoluteScenesPath, _pipelinePath); |
|
|
|
string assetScenesPath = absoluteScenesPath.Replace(Application.dataPath, ""); |
|
|
|
assetScenesPath = Path.Combine("Assets", assetScenesPath.Remove(0, 1)); |
|
|
|
|
|
|
|
string filesPath = Path.Combine(assetScenesPath, _pipelinePath); |
|
|
|
|
|
|
|
string listFilePath = Path.Combine(filesPath, "EditorPlayModeTests.asset"); |
|
|
|
|
|
|
|
|
|
|
AssetDatabase.CreateAsset(ScriptableObject.CreateInstance<EditorPlayModeTests>(), listFilePath); |
|
|
|
AssetDatabase.Refresh(); |
|
|
|
|
|
|
|
foreach (string path in listFile.scenesPath) |
|
|
|
for ( int i=0 ; i<listFile.scenesPath.Length ; ++i) |
|
|
|
var p = new FileInfo(path); |
|
|
|
string path = listFile.scenesPath[i]; |
|
|
|
|
|
|
|
var p = new FileInfo( Path.Combine(filesPath, path ) ); |
|
|
|
var split = s_Path.Aggregate("", Path.Combine); |
|
|
|
split = string.Format("{0}{1}", split, Path.DirectorySeparatorChar); |
|
|
|
var splitPaths = p.FullName.Split(new[] { split }, StringSplitOptions.RemoveEmptyEntries); |
|
|
|
|
|
|
name = p.Name, |
|
|
|
relativePath = path, |
|
|
|
relativePath = p.ToString(), |
|
|
|
frameWait = 100 |
|
|
|
frameWait = 100, |
|
|
|
sceneListIndex = i |
|
|
|
}; |
|
|
|
|
|
|
|
if (fixtureParam) |
|
|
|