I can´t do an ScriptableObject in unty. I do this script:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
[CreateAssetMenu(fileName = "SpriteDB", menuName = "AR+GPS/SpriteDB")]
public class SpriteDB : ScriptableObject
{
public class Iconos{
public string nombre;
public Sprite icon;
public string url;
}
public List<Iconos> Entries;
public Sprite GetEntryById(string Id)
{
Sprite result = null;
foreach (var entry in Entries)
{
if (entry.nombre == Id)
{
result = entry.icon;
break;
}
}
return result;
}
}
Butwhen i create the object i get the following error:No script asset for SpriteDB. Check that the definition is in a file of the same name and that it compiles properly.

