I’m following the Incisor API documentation to create a PixelsObject
from a graphic. I’ve confirmed that pawn.png
is in my Assets directory and visible in LiveView. However, I’m getting an exception on the second line of code, and the console log is never displayed.
Here’s a simple block of code that will reproduce the error:
class ProjectMain {
init() {
let pawn = new GraphicObject(nc.graphicAssets.pawn, nc.mainScene, "Pawn");
let pawnPixelsObject = nc.pixelsObjects.getPixelsObject(pawn.materialMaster.mainTexture);
console.log(pawnPixelsObject);
}
}
Can anyone help me understand why an exception occurs?