Skip to content

format

typescript
Path.MatchExtension(path, ext, ignore_case)

class: Path

description

Check if the specified path has the current extension.

parameter

param_nametypedescription
pathstringThe specified path.
extstringThe extension.
ignore_caseboolean?Whether to ignore case.

return

typedescription
booleanWhether it meets the condition.

code example

typescript
let result = Path.MatchExtension("Assets/path","path");
Debug.Log(result);