Getting Started

Create a global onInkryptAPIReady function

function onInkryptAPIReady() {
  // Your logic here
}

 

Or, add onInkryptAPIReady property to the window object as a function

window.onInkryptAPIReady = function() {
  // Your logic here
}

Get inkrypt instance object inside onInkryptAPIReady function

let player = null
window.onInkryptAPIReady = function() {

  // get inkrypt instance object
  player = inkrypt.getObjects()[0]

}