public AssetGetter(string uri, string assetId, VrAssetFormat assetType, string reason) { m_URI = uri; m_Asset = new PolyRawAsset(assetId, assetType); m_JsonSerializer = new JsonSerializer(); m_JsonSerializer.ContractResolver = new SnakeToCamelPropertyNameContractResolver(); Reason = reason; }
public ToolkitRawImage LoadAsImage(string uri) { uri = PolyRawAsset.GetPolySanitizedFilePath(uri); string path = Path.Combine(m_uriBase, uri); RawImage rawImage = ImageUtils.FromImageData(File.ReadAllBytes(path), path); return(new ToolkitRawImage { format = TextureFormat.RGBA32, colorData = rawImage.ColorData, colorWidth = rawImage.ColorWidth, colorHeight = rawImage.ColorHeight }); }
public IBufferReader Load(string uri) { // null uri means the binary chunk of a .glb uri = (uri == null) ? null : PolyRawAsset.GetPolySanitizedFilePath(uri); return(m_delegate.Load(uri)); }