16 [CustomPropertyDrawer(typeof(StreamingFolder), useForChildren:
true)]
19 protected override bool ValidatePath(
string fullPath,
string relativePath, out
string errorMessage) {
20 var fullInfo =
new DirectoryInfo(fullPath);
21 var streamingInfo =
new DirectoryInfo(Application.streamingAssetsPath);
23 if (IsInsideOrEqual(fullInfo, streamingInfo)) {
27 errorMessage =
"The specified folder is not a streaming asset folder. Streaming asset folders must be inside project's Assets/StreamingAssets directory.";
32 private bool IsInsideOrEqual(DirectoryInfo path, DirectoryInfo folder) {
33 if (path.Parent ==
null) {
37 if (
string.Equals(path.FullName, folder.FullName, StringComparison.InvariantCultureIgnoreCase)) {
41 return IsInsideOrEqual(path.Parent, folder);
override bool ValidatePath(string fullPath, string relativePath, out string errorMessage)