给预制体添加子物体并保存,预期效果:
![](https://img-blog.csdn.net/20170711170543047?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQveXVld2VpMTk=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
public class GunFireMenuItems : MonoBehaviour
{
public static string effectPrefabPath = "Assets/MuzzleFlashes 1/";
public static string effectOSXPath = "Assets/../StreamingAssets/OSX/GunFire/";
public static string effectLinuxPath = "Assets/../StreamingAssets/Linux/GunFire/";
[MenuItem ("Assets/AssetBundles/GunFire/AddGunFireEffectTag")]
public static void AddGunFireEffectTag ()
{
EditorUtility.DisplayProgressBar ("Modify Prefab", "Please wait...", 0);
var files = new DirectoryInfo (effectPrefabPath).GetFiles ();
for (