Пример #1
0
        public static ResourceManagerOptions ReadOptionsData()
        {
            ResourceManagerOptions optionsData = (ResourceManagerOptions)Resources.Load(ResourceManagerConfigName);

            //if (optionsData == null)
            //{
            //    LogError("Fatal error: No AssetBundleOptionsData,please create it and re build,named: " + AssetBundleConfigName);
            //}
            return(optionsData);
        }
Пример #2
0
        public static ResourceManagerOptions LoadFile()
        {
            ResourceManagerOptions optionsData = (ResourceManagerOptions)Resources.Load(AssetBundleConfigName);

            if (optionsData)
            {
                return(optionsData);
            }
            string filePath = AssetBundleResFolder + AssetBundleConfigName;

            optionsData = ScriptableObject.CreateInstance <ResourceManagerOptions>();
            AssetDatabase.CreateAsset(optionsData, filePath);
            AssetDatabase.Refresh();
            return(optionsData);
        }