不会显示统一克隆



我是新来的编码,我正试图在统一中生成一个球的克隆,但它不会出现。它确实在刷出点刷出,但没有出现。

下面是我的代码:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameController : MonoBehaviour
{
public GameObject ball;
public Transform spawnPoint;
// Start is called before the first frame update
void Start()
{
SpawnBall();
}
// Update is called once per frame
void Update()
{

}
void SpawnBall()
{
Instantiate(ball, spawnPoint.position, Quaternion.identity);
}
}

编辑:这是一个3d游戏,网格渲染器是启用的。

没关系,我只是重新做了一下球,它工作了。

¯_()_/¯

最新更新