Unity开发:ArgumentException: The Object you want to instantiate is null.

这会引发错误,但对象实际上已实例化,并且一切按预期工作。无论我重现多少次,该错误都不会停止程序。
using UnityEngine;

public class BulletAttr : MonoBehaviour
{

public int damage;
public int speed;
public GameObject webPrefab;


private void OnTriggerEnter2D(Collider2D collider)
{
    if (collider.tag == "Border")
    {
        Destroy(gameObject);
    }
    if (collider.tag == "Fish")
    {
        GameObject web = Instantiate(webPrefab);
        web.transform.SetParent(gameObject.transform.parent, false);
        web.transform.position = gameObject.transform.position;
        Destroy(gameObject);
    }
}

}

ArgumentException: The Object you want to instantiate is null.
UnityEngine.Object.CheckNullArgument (System.Object arg, System.String message) (at C:/buildslave/unity/build/Runtime/Export/UnityEngineObject.cs:239)
UnityEngine.Object.Instantiate[GameObject] (UnityEngine.GameObject original) (at C:/buildslave/unity/build/Runtime/Export/UnityEngineObject.cs:199)
BulletAttr.OnTriggerEnter2D (UnityEngine.Collider2D collider) (at Assets/Scripts/BulletAttr.cs:19)

img

这个地方为什么实例化出webPrefab后,将其设置为自己的子物体,然后有将自己删了。这不是实例化之后就删除了么

意思是代码正常运行了,但是有这个报错?