下载的assetbundle不在Application.streamingAssetsPath中

时间:2018-01-10 10:59:44

标签: c# unity3d assetbundle

我使用Application.streamingAssetsPath

获取了assetbundle

但是 import { Component, OnInit, Input } from '@angular/core'; import { FormGroup, FormControl, FormArray, Validators, FormBuilder, NgForm } from '@angular/forms'; import { CustomValidators } from '../../directives/custom-validator.directive'; import { logbaseService } from "../../services/logbase.service"; @Component({ selector: 'app-part-info', templateUrl: './part-info.component.html', styleUrls: ['./part-info.component.css'] }) export class PartInfoComponent implements OnInit { @Input() partInfoData: string; partInfo: any = null; partInfoForm: FormGroup; partNumber: FormControl; followingProcess: FormControl; deliveryPoint: FormControl; partWeight: FormControl; partMaterial: FormControl; creationDate: FormControl; changeDate: FormControl; predecessorNo: FormControl; lotsSize: FormControl; partClassification: FormControl; width: FormControl; length: FormControl; height: FormControl; status: FormControl; constructor(private form: FormBuilder, private logBaseService: logbaseService) { } ngOnInit() { this.getAllProductInfo(); this.createFormControls(); this.createForm(); console.log(JSON.stringify(this.partInfo)); }; getAllProductInfo() { this.logBaseService.getPartsInfoAPI() .subscribe( data => this.partInfo = data.partInfo, // data is available only here error => console.log('Server Error') ) } createFormControls() { this.partInfoForm = new FormGroup({ partNumber: new FormControl(), partName: new FormControl({ value: '', disabled: true }), followingProcess: new FormControl({ value: '', disabled: true }), deliveryPoint: new FormControl({ value: '', disabled: true }), partWeight: new FormControl('', Validators.required), partMaterial: new FormControl(), creationDate: new FormControl({ value: '', disabled: true }), changeDate: new FormControl(), predecessorNo: new FormControl(), lotsSize: new FormControl('', Validators.required), partClassification: new FormControl(), width: new FormControl('', Validators.required), length: new FormControl('', Validators.required), height: new FormControl('', Validators.required), status: new FormControl() }); }; createForm() { // this.partInfoForm = new FormGroup({ // partNumber: this.partInfoData.partNumber // }); } saveForm(partInfoForm: NgForm) { console.log('Form saved successfully.'); console.log(partInfoForm.value); } } 是空的....

在哪里下载了assetbundle以及如何加载下载的assetbundle?

我的Unity版本是2017.3

谢谢vmchar。但我不知道如何使用

AssetBundle manifestBundle = AssetBundle.LoadFromFile(manifestBundlePath); AssetBundleManifest manifest = manifestBundle.LoadAsset(" AssetBundleManifest"); 什么是manifestBundlePath以及如何访问此路径。

如何在使用UnityWebRequest.GetAssetBundle之前访问下载的assetsbundle

如果你提出方法,我真的非常感谢你。

1 个答案:

答案 0 :(得分:0)

Unity的资产包没有下载到streamingAssets文件夹中,它们被下载到Cache,你可以阅读它here。此缓存路径对于每个平台都是唯一的,Unity的API封装了Cache类中的路径。您还应该记住,用户可以通过清理应用程序资源(在移动平台上的系统设置中完成)从Cache中删除所有下载的软件包。此link也可能有所帮助。