예제 #1
0
        public static Object Load(string name)
        {
            string path = ResourceConfig.Path(type, name);

            AssetsResponse assets = controller.Load(path);

            if (assets != null)
            {
                return(assets.Assets[0]);
            }
            return(null);
        }
예제 #2
0
        public static T Load <T>(string name) where T : Object
        {
            string path = ResourceConfig.Path(type, name);

            AssetsResponse assets = controller.Load(path);

            if (assets != null)
            {
                return(assets.Assets[0] as T);
            }
            return(null);
        }
예제 #3
0
        public AssetsResponse Load(string path)
        {
            LoadAssetsDependencies(path);

            if (caches.ContainsKey(path))
            {
                return(caches[path]);
            }
            else
            {
                AssetsResponse assets = loader.LoadAssets(path);

                if (assets != null)
                {
                    caches.Add(path, assets);
                }
                return(assets);
            }
        }