我想在 AR 相机中播放视频。我总共有 10 个视频和一个视频播放器。我正在从服务器下载视频播放器作为资产包,名称为 videoplayer.unit3d 并存储到 SD 卡中。当我扫描 imageTarget 时,我正在使用AssetBundle.LoadFromFile()函数读取视频资产包文件,并且第一次它工作正常。
如果我扫描第二个 imageTarget 它会显示以下错误
“无法加载,因为已经加载了另一个具有相同文件的 AssetBundle”
我试过 a bundle.Unload(true);andCaching.cleanchache()但它不工作抛出同样的错误。也试过bundle.Unload(false);
private void loadObject(string resourcePath, string objectName, TrackableBehaviour trackableBehaviuor, string videoUrl)
{
Debug.Log("Resource path " + resourcePath + " objectName " + objectName);
Debug.Log("Video Url from sd card " + videoUrl);
FileInfo fileInfo = new FileInfo(resourcePath);
if (!fileInfo.Exists)
return;
Debug.Log("File is present");
AssetBundle bundle = AssetBundle.LoadFromFile(resourcePath, 0, 0);//www.assetBundle;
Debug.Log("Bundle data is " + bundle);
if (bundle …Run Code Online (Sandbox Code Playgroud)在日期选择器中,我试图获得一个月的信,其他人是整数.它返回月份的全名.但我想要本月的第一个三分之一的信件.
我试过了:
SimpleDateFormat sdf = new SimpleDateFormat("yyyy,MMMM, dd ");
System.out.println(sdf.format(new SimpleDateFormat(new Date()).toString()));
Run Code Online (Sandbox Code Playgroud)
产量:2013年10月18日
我希望输出为:2013年10月18日