资源路径:

string path = "Assets/UI/Prefab/ui_login/ui_login.prefab";

获取资源名字:

string name = Path.GetFileNameWithoutExtension(path);

结果:

unity中已知资源的路径获取资源名字

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2022-01-07
  • 2022-01-22
  • 2022-01-31
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-26
  • 2022-01-17
  • 2021-11-18
  • 2021-09-03
  • 2022-12-23
相关资源
相似解决方案