export function importActor ( entry , projectClient , options , callback ) { let name = entry . name ; if ( name === "Sprite" ) { const parentNode = projectClient . entries . parentNodesById [ entry . id ] ; if ( parentNode != null ) name = parentNode . name ; } projectClient . editAsset ( SupClient . query . asset , "addNode" , name , options , ( nodeId ) => { importComponent ( entry , projectClient , nodeId , ( err ) => { callback ( err , nodeId ) ; } ) ; } ) ; } export function importComponent ( entry , projectClient , nodeId , callback ) { projectClient . editAsset ( SupClient . query . asset , "addComponent" , nodeId , "SpriteRenderer" , null , ( componentId ) => { projectClient . editAsset ( SupClient . query . asset , "editComponent" , nodeId , componentId , "setProperty" , "spriteAssetId" , entry . id , callback ) ; } ) ; }