因此,我尝试实例化文本网格物体pro gameobject,以便每次得分提高时,都会出现该文本的克隆,并指示玩家他/她已获得积分。但是在编写代码并对其进行了测试之后,我检查了文本是否已被克隆,但我也意识到那些克隆的文本不可见。这是代码。
public Rigidbody2D plusScore;
public Transform scoreInstancePos;
public void AddScore ()
{
workProgress += workEfficiency;
//the indicator
Rigidbody2D plusInstance;
plusInstance = Instantiate(plusScore, scoreInstancePos.position, Quaternion.identity) as Rigidbody2D;
plusInstance.AddForce(scoreInstancePos.up * 1000);
} //Makes it float up
这也是一个安卓游戏。可能有问题吗?