Hello, i try to make an infinite runner type of game and i made the background to move continously with OnBecameInvisible function and in console i get this error : Assertion failed on expression: 'go.IsActive()'
but the game works. In fact i get this error after i stop running the game. How can i fix this?
Code looks like this:
private void OnBecameInvisible()
{
this.gameObject.transform.position = new Vector3(BackGroundScale + GameObject.Find("B2").transform.position.x, this.gameObject.transform.position.y, this.gameObject.transform.position.y);
}
↧