Exemple #1
0
 public T getValue <T>(IObjectKeeper <T> keeper) where T : UnityEngine.Object
 {
     if (keeper != null)
     {
         return(keeper.getObjectById(id));
     }
     else
     {
         return(null);
     }
 }
Exemple #2
0
        public T getValue <T>(Scene scene) where T : UnityEngine.Object
        {
            Type keeperType          = typeof(IObjectKeeper <>).MakeGenericType(typeof(T));
            IObjectKeeper <T> keeper = scene.findInstance(keeperType) as IObjectKeeper <T>;

            if (keeper != null)
            {
                return(keeper.getObjectById(id));
            }
            else
            {
                return(null);
            }
        }
Exemple #3
0
 public static ObjectReference convert <T>(T obj, IObjectKeeper <T> keeper) where T : UnityEngine.Object
 {
     return(new ObjectReference(keeper.getIdOfObject(obj)));
 }