示例#1
0
        /// <summary>
        /// Gets the asset.
        /// </summary>
        /// <returns>The asset.</returns>
        /// <param name="key">url if urlFormat is null or parameter for urlFormat otherwise.</param>
        public void GetAsset(string key, Action <T> callback)
        {
            T ins = pool.Get(key);

            if (ins != null)
            {
                callback(ins);
            }
            else
            {
                Preload(key, a => {
                    callback(a);
                });
            }
        }
示例#2
0
 internal static Component FindById(int id)
 {
     // Returns null if not known or already garbage collected
     return(LookupById.Get(id));
 }