Example #1
0
        public T Load <T>(string asset) where T : UnityEngine.Object
        {
            T result = null;

            if (loadMode == LoadMode.Original)
            {
                result = OriginalResourceLoader.loadResource <T>(resourcePath, asset);
            }
            else if (loadMode == LoadMode.AssetBundle)
            {
                result = bundleResourceLoader.LoadAsset <T>(asset);
            }
#if UNITY_EDITOR
            else if (loadMode == LoadMode.Editor)
            {
                result = UnityEditor.AssetDatabase.LoadAssetAtPath <T>(asset);
            }
#endif

            return(result);
        }