|
|
|
|
|
|
using System.IO; |
|
|
|
using System.Linq; |
|
|
|
using UnityEngine; |
|
|
|
|
|
|
|
namespace UnityEditor.Experimental.Rendering.LightweightPipeline |
|
|
|
{ |
|
|
|
|
|
|
public static string[] GetPaths() |
|
|
|
{ |
|
|
|
return new[] |
|
|
|
var srpMarker = Directory.GetFiles(Application.dataPath, "SRPMARKER", SearchOption.AllDirectories).FirstOrDefault(); |
|
|
|
var paths = new string[srpMarker == null ? 1 : 2]; |
|
|
|
var index = 0; |
|
|
|
if (srpMarker != null) |
|
|
|
Path.GetFullPath("Packages/com.unity.render-pipelines.lightweight/LWRP/Shaders"), |
|
|
|
}; |
|
|
|
var rootPath = Directory.GetParent(srpMarker).ToString(); |
|
|
|
paths[index] = Path.Combine(rootPath, "ScriptableRenderPipeline/LightweightPipeline"); |
|
|
|
index++; |
|
|
|
} |
|
|
|
paths[index] = Path.GetFullPath("Packages/com.unity.render-pipelines.lightweight"); |
|
|
|
return paths; |
|
|
|
} |
|
|
|
} |
|
|
|
} |