123456789101112131415161718192021222324252627282930313233343536373839404142 |
- using System.Collections.Generic;
- using UnityEngine;
- namespace ARLocation
- {
- [CreateAssetMenu(fileName = "PrefabDb", menuName = "AR+GPS/PrefabDatabase")]
- public class PrefabDatabase : ScriptableObject
- {
- [System.Serializable]
- public class PrefabDatabaseEntry
- {
-
-
-
-
- public string MeshId;
-
-
-
- public GameObject Prefab;
- }
- public List<PrefabDatabaseEntry> Entries;
- public GameObject GetEntryById(string Id)
- {
- GameObject result = null;
- foreach (var entry in Entries)
- {
- if (entry.MeshId == Id)
- {
- result = entry.Prefab;
- break;
- }
- }
- return result;
- }
- }
- }
|