LensStudio:Preview.AssetNotReady
ClassPause reason reported when some assets are not ready or a script failed to compile.
Pause reason reported when some assets are not ready or a script failed to compile. It is not resumable: resume() does not clear it, so fix the project instead.
Index
Properties
Example
Explain why a preview is waiting before a tool captures it. Pass the preview's pauseReason. AssetNotReady is not resumable, so the guidance asks the user to fix the project instead of calling resume().
import { LensPreview } from 'LensStudio:LensPreview';
import { AssetNotReady } from 'LensStudio:Preview';
export function assetGuidance(reason: LensPreview['pauseReason']): string | null {
if (!(reason instanceof AssetNotReady)) return null;
const detail = reason.message.replace(/\n/g, ' ');
return `${detail} Fix the errors in the Logger panel, then try again.`;
}
Constructors
Constructor
new AssetNotReady():
AssetNotReady
Constructs an AssetNotReady value with its default message.
Returns
AssetNotReady
Properties
isResumable
readonlyisResumable:boolean
Whether the preview can be resumed from this state. Always false for AssetNotReady.
isSuspending
readonlyisSuspending:boolean
Whether this reason suspends the preview input. Always false for AssetNotReady.
message
readonlymessage:string
User-facing explanation that some assets are not ready or a script failed to compile.