Returns the name of a given path.



参数 描述
index The index of the path to check.

返回: String(字符串)。


This function will return the name of the path that is referenced as a string. The name is whatever has been used to define the path in the editor or (if the path has been created through a code function) it will return a string with the format "_newpathXX" where "XX" is the number of the path generated, starting at 0 and incrementing by one every time a new path is created. Please note that this is only a string and cannot be used to reference the path directly - for that you would need the path index. You can, however, use this string to get the path index using the returned string along with the function asset_get_index().


name = path_get_name(mypath);

This will set "name" to the name of the path indexed in the variable "mypath".

上一页: Path Information
下一页: path_get_number
© Copyright YoYo Games Ltd. 2018 All Rights Reserved