其他分享
首页 > 其他分享> > Unity 编辑器

Unity 编辑器

作者:互联网

1. 获取拖拽物体的路径

  1. Object selectedObject = EditorGUILayout.ObjectField(selectedObject, typeof(Object));
  2. if (selectedObject != null) {
  3. string assetPath = AssetDatabase.GetAssetPath(selectedObject);
  4. }

标签:assetPath,string,Object,Unity,GetAssetPath,编辑器,AssetDatabase,selectedObject
来源: https://www.cnblogs.com/DGJS/p/13751457.html