- Home /
,My clone sprite is disapeared.
I wanna do a infinite map but when i put the floor this disapeared, im using GameManager in a prefab, and visual studio 2019. Here is the code. The classes is in spanish This happen when i push play mode
using System.Collections;
using System.Collections.Generic;
using UnityEngine; public class GameManager : MonoBehaviour { public GameObject Col; public Renderer Fondo;
void Start()
{
//Mapa infinito
for (int i = 0; i < 21; i++)
{
Instantiate(Col, new Vector2(-10 +i,-3), Quaternion.identity);
}
}
void Update()
{
Fondo.material.mainTextureOffset = Fondo.material.mainTextureOffset + new Vector2(0.15f, 0) * Time.deltaTime;
}
}
,I wanna do a infinite map but when i put the floor this disapeared with the scene Here is yhe cod, im speak spanish so the class is in spanish. Is a GameManager
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameManager : MonoBehaviour {
public GameObject Col;
public Renderer Fondo;
void Start()
{
//Mapa infinito
for (int i = 0; i < 21; i++)
{
Instantiate(Col, new Vector2(-10 +i,-3), Quaternion.identity);
}
}
void Update()
{
Fondo.material.mainTextureOffset = Fondo.material.mainTextureOffset + new Vector2(0.15f, 0) * Time.deltaTime;
}
}
,
Your answer
Follow this Question
Related Questions
Infinite Road Clone Duplication 1 Answer
FLAPPY BIRD CLONE 1 Answer
How to change sprite on a cloned object? 1 Answer