源战役客户端
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

24 lignes
538 B

  1. using UnityEngine;
  2. using System.Collections;
  3. using System.IO;
  4. public class EditorUtils : MonoBehaviour
  5. {
  6. /// <summary>
  7. ///
  8. /// </summary>
  9. /// <param name="dirName"></param>
  10. /// <returns>filename</returns>
  11. public static string SelectObjectPathInfo(ref string dirName)
  12. {
  13. if (UnityEditor.Selection.activeInstanceID < 0)
  14. {
  15. return "";
  16. }
  17. string path = UnityEditor.AssetDatabase.GetAssetPath(UnityEditor.Selection.activeInstanceID);
  18. dirName = Path.GetDirectoryName(path) + "/";
  19. return Path.GetFileName(path);
  20. }
  21. }