Hello, i am new in Unity and i watch tutorials from Udemy. I need your help about something. I have the following code :
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
public class LevelManager : MonoBehaviour
{
public static LevelManager Instance { get; private set; }
public Player Player { get; private set; }
public CameraController Camera { get; private set; }
private List _checkpoints;
private int _currentCheckpointIndex;
public Checkpoint DebugSpawn;
public void Awake()
{
Instance = this;
}
public void Start ()
{
_checkpoints = FindObjectOfType().OrderBy(t => t.transform.position.x).ToList();
}
public void Update()
{
}
public void KillPlayer()
{
}
private IEnumerator KillPlayerCo()
{
yield break;
}
}
and i have an error in orderby. : The type arguments for method `System.Linq.Enumerable.OrderBy(this System.Collections.Generic.IEnumerable, System.Func)' cannot be inferred from the usage. Try specifying the type arguments explicitly
i am so confused and i dont know what i have to do. I hope to help me !
↧