'error CS0104: 'Vector2' is an ambiguous reference between 'System.Numerics.Vector2' and 'UnityEngine.Vector2' [duplicate]
Help, I am making a game in unity but I get this error, what do I do?
This is my code.
using System.Numerics;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameManager : MonoBehaviour
{
public GameObject col;
public Renderer fondo;
// Start is called before the first frame update
void Start()
{
for (int i = 0; i < 21; i++){
Instantiate(col,new Vector2(-10 + i,-3),Quaternion.identity);
}
}
// Update is called once per frame
void Update()
{
fondo.material.mainTextureOffset += new Vector2(0.02f, 0) * Time.deltaTime;
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

