我使用Application.streamingAssetsPath
但是 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
如果你提出方法,我真的非常感谢你。