Class PathUtil
PLATEAU のファイルパスに関するユーティリティです。
Inheritance
System.Object
PathUtil
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: PLATEAU.Util
Assembly: cs.temp.dll.dll
Syntax
public static class PathUtil
Fields
PLATEAUSrcFetchDir
Declaration
public static readonly string PLATEAUSrcFetchDir
Field Value
Type | Description |
---|---|
System.String |
UdxFolderName
Declaration
public const string UdxFolderName = "udx"
Field Value
Type | Description |
---|---|
System.String |
Properties
SdkBasePath
PLATEAU SDK のパスは、 GitHub からインポートした場合は Packages 以下になり、 Unity Asset Store からインポートした場合は Assets 以下になります。 SDKの基本パスを返します。
Declaration
public static string SdkBasePath { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
FullPathToAssetsPath(String)
フルパスをAssetsフォルダからのパスに変換します。
パスがAssetsフォルダ内を指すことが前提であり、そうでない場合は
Declaration
public static string FullPathToAssetsPath(string filePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | filePath |
Returns
Type | Description |
---|---|
System.String |
IsSubDirectory(String, String)
Declaration
public static bool IsSubDirectory(string subPath, string dir)
Parameters
Type | Name | Description |
---|---|---|
System.String | subPath | |
System.String | dir |
Returns
Type | Description |
---|---|
System.Boolean |
IsSubDirectoryOfAssets(String)
Declaration
public static bool IsSubDirectoryOfAssets(string filePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | filePath |
Returns
Type | Description |
---|---|
System.Boolean |
IsValidInputFilePath(String, String, Boolean)
入力ファイル用のパスとして正しければtrue,不適切であればfalseを返します。
Declaration
public static bool IsValidInputFilePath(string filePath, string expectedExtension, bool shouldFileInAssetsFolder)
Parameters
Type | Name | Description |
---|---|---|
System.String | filePath | 入力ファイルのパスです。 |
System.String | expectedExtension | 入力ファイルとして想定される拡張子です。 |
System.Boolean | shouldFileInAssetsFolder | ファイルがUnityプロジェクトのAssetsフォルダ内にあるべきならtrue、他の場所でも良いならfalseを指定します。 |
Returns
Type | Description |
---|---|
System.Boolean |
IsValidOutputFilePath(String, String)
出力用のファイルパスとして正しければtrue,不適切であればfalseを返します。
Declaration
public static bool IsValidOutputFilePath(string filePath, string expectedExtension)
Parameters
Type | Name | Description |
---|---|---|
System.String | filePath | |
System.String | expectedExtension |
Returns
Type | Description |
---|---|
System.Boolean |
SdkPathToAssetPath(String)
SdkBasePath からの相対パスを受け取り、アセットパスに変換して返します。
Declaration
public static string SdkPathToAssetPath(string sdkPath)
Parameters
Type | Name | Description |
---|---|---|
System.String | sdkPath |
Returns
Type | Description |
---|---|
System.String |