场景中 克隆生成的物体 ,为 在PoolManager 的 池子中的物体的子物体。
编辑器中退出Player模式后,报错。
目前没有什么办法解决这个报错。
Can't destroy Transform component of ''. If you want to destroy the game object, please call 'Destroy' on the game object instead. Destroying the transform component is not allowed.
在退出应用之前 destory克隆物体,但是还是报错。
...
#region 退出 应用
/// <summary>
/// 当 退出应用的时候
/// </summary>
void OnApplicationQuit()
{
Debug.Log("Application ending after " + Time.time + " seconds");
destoryAllChild(trans001);
}//
private void destoryAllChild(Transform trans)
{
print("destoryAllChild");
if (trans != null
&& trans.childCount > 0)
{
print(trans.name + "///"+ trans.childCount);
for (i