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?
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745352048a4623892.html
评论列表(0条)