public void LoadAllAssets(Action <GeometryProjector> successCallback, Action <GeometryProjector> failureCallback) { this.onLoadedCompleteCallback = successCallback; this.onLoadedFailureCallback = failureCallback; AssetManager assetManager = Service.Get <AssetManager>(); assetManager.Add3DModelToManifest(this.parent.Config.AssetName); AssetHandle item = AssetHandle.Invalid; this.outstandingAssets++; assetManager.Load(ref item, this.parent.Config.AssetName, new AssetSuccessDelegate(this.OnAssetSuccess), new AssetFailureDelegate(this.OnAssetFailure), this.parent.Config.AssetName); this.handles.Add(item); if (this.parent.Config.AttachmentAssets != null) { int i = 0; int num = this.parent.Config.AttachmentAssets.Length; while (i < num) { string text = this.parent.Config.AttachmentAssets[i]; assetManager.Add3DModelToManifest(text); AssetHandle item2 = AssetHandle.Invalid; this.outstandingAssets++; assetManager.Load(ref item2, text, new AssetSuccessDelegate(this.OnAssetSuccess), new AssetFailureDelegate(this.OnAssetFailure), text); this.handles.Add(item2); i++; } } }
public void Reset() { AssetManager assetManager = Service.Get <AssetManager>(); assetManager.Add3DModelToManifest(this.parent.Config.AssetName); if (this.parent.Config.AttachmentAssets != null) { int i = 0; int num = this.parent.Config.AttachmentAssets.Length; while (i < num) { string assetName = this.parent.Config.AttachmentAssets[i]; assetManager.Add3DModelToManifest(assetName); i++; } } }