Unity opens the folder directory

Unity opens the folder directory

solution

  • Call API: EditorUtility.RevealInFinder ("path");

Origin of the problem

  • Recently writing an editor needs this function

Solution process

  • Search: Unity opens the folder directory

  • I have seen a few solutions that use cmd for the Windows platform and Shell for the Mac platform.

  • The test is ok, but the specified file will not be selected after opening the directory

  • I thought of the Unity right-click file menu Show in Explorer option and changed the search keyword

  • Search: Unity Show in Explorer

  • Then I found the above API

    See more APIs

Guess you like

Origin www.cnblogs.com/zouqiang/p/12753297.html