コード例 #1
0
		/// <summary>
		/// Returns true if the given asset is stored in the Baked/ subfolder
		/// of the plugin's asset cache.
		/// </summary>
		/// <param name="asset"></param>
		/// <returns></returns>
		public static bool IsAssetInAssetCacheBakedFolder(Object asset)
		{
#if UNITY_EDITOR
			string assetPath = GetAssetPath(asset);
			return HEU_AssetDatabase.IsPathInAssetCacheBakedFolder(assetPath);
#else
			Debug.LogWarning(HEU_Defines.HEU_USERMSG_NONEDITOR_NOT_SUPPORTED);
			return false;
#endif
		}
コード例 #2
0
		public static void DeleteAssetIfInBakedFolder(Object asset)
		{
#if UNITY_EDITOR
			string assetPath = GetAssetPath(asset);
			if (HEU_AssetDatabase.IsPathInAssetCacheBakedFolder(assetPath))
			{
				AssetDatabase.DeleteAsset(assetPath);
			}
#else
			// TODO RUNTIME: AssetDatabase is not supported at runtime. Do we need to support this for runtime?
			Debug.LogWarning(HEU_Defines.HEU_USERMSG_NONEDITOR_NOT_SUPPORTED);
#endif
		}