練習がてらあるyoutuberさんの動画を見ながらUnityでゲームを作っていたのですがエラーの意味が分からなかったので教えていただきたいです。解決法も一緒に教えてくれると助かります。
using System.Threading;
using System.Numerics;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Enemy : Movement
{
public bool Test; private Transform player; private Vector3 playerLastPos, startPos, movementPos; [SerializeField] private float chaseSpeed = 0.8f,turningDelay = 1f; private float lastFollowTime, turningTimeDelay = 1f; private void Start() { player = GameObject.FindWithTag("Player").transform; playerLastPos = player.position; startPos = transform.position; lastFollowTime = Time.time; turningTimeDelay *= turningDelay; } private void Update() { ChasingPlayer(); } void ChasingPlayer() { if (Test) { Chase(); } else { movementPos = startPos - transform.position; if (Vector3.Distance(transform.position,startPos) < 0.1f) { movementPos = Vector3.zero; } } CharacterMovement(movementPos.x, movementPos.y); } void Chase() { if (Time.time - lastFollowTime > turningTimeDelay) { playerLastPos = player.transform.position; lastFollowTime = Time.time; } if (Vector3.Distance(transform.position,playerLastPos) > 0.15f) { movementPos = (playerLastPos - transform,position).normalized * chaseSpeed; } else { movementPos = Vector3.zero; } }
}
長くてすいません。エラー内容は
Assets\Scripts\Enemies\Enemy.cs(15,13): error CS0104: 'Vector3' is an ambiguous reference between 'UnityEngine.Vector3' and 'System.Numerics.Vector3'
です。おねがいいたします

回答1件
あなたの回答
tips
プレビュー
下記のような回答は推奨されていません。
このような回答には修正を依頼しましょう。
また依頼した内容が修正された場合は、修正依頼を取り消すようにしましょう。
2022/10/05 02:40