Example #1
0
		private void GetAssetOnFinish<T>(Assurer assurer,Action<T> callback) where T:UnityEngine.Object
        {
            if(callback == null)
                return;
            if(assurer == null)
                callback(null);
            callback(assurer.Get<T>());
        }
Example #2
0
        public T LoadSync <T>(string AssetPath) where T : UnityEngine.Object
        {
            if (AssetPath.IsEmptyOrNull())
            {
                return(null);
            }
            Assurer assurer = ContainsAssetPath(AssetPath)?mLoadedAssurer[AssetPath]:GetAssurer(AssetPath);

            if (assurer == null)
            {
                return(null);
            }
            return(assurer.Get <T>());
        }