Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

自定义皮肤的目录位置引用错误 #170

Open
HanasakiMana opened this issue Oct 14, 2024 · 1 comment
Open

自定义皮肤的目录位置引用错误 #170

HanasakiMana opened this issue Oct 14, 2024 · 1 comment

Comments

@HanasakiMana
Copy link

Assets/Scripts/UI/CustomSkin.csStart函数中,对自定义皮肤的目录位置是这样定义的:

var path = new DirectoryInfo(Application.dataPath).Parent.FullName + "/Skin/"

我不清楚这条代码在Windows下的运行结果,但在macOS下,由于之后的引用中文件名开头同样带有/符号,例如"/tap.png",这会导致错误的目录引用,即../Skin//tap.png,导致对皮肤文件的引用失败。

@LeZi9916
Copy link
Contributor

LeZi9916 commented Oct 15, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants