Search Unity

Error with using System.ID

Discussion in 'Scripting' started by Nak44, Jul 25, 2017.

  1. Nak44

    Nak44

    Joined:
    Jun 20, 2017
    Posts:
    4
    Hi everyone. I found the next error:

    Assets/ScriptsGenerales/22.7.17/dataBaseHandler.cs(3,14): error CS0234: The type or namespace name `ID' does not exist in the namespace `System'. Are you missing an assembly reference?

    In this script:

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using System.ID;
    4.  
    5. public class dataBaseHandler : MonoBehaviour {
    6.  
    7.     public DataBase bd;
    8.  
    9.     void Start () {
    10.         string datos = File.ReadAllText(Application.dataPath + "/Scripts/cell1.json");
    11.         bd = JsonUtility.FromJson<DataBase>(datos);
    12.  
    13.     }  
    14.  
    15.     public Objeto buscarObjetoPorId(int id){
    16.         return bd.baseDatos.Find(objeto => objeto.id == id);
    17.     }
    18. }
    19.  
    Anyone have an idea how to fix it?
    Thanks for reading
     
  2. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    What is System.ID? According to google it doesn't exist. So you might as well delete line 3 entirely.