No url back from entity properties


#1

Trying to get the entity url from the model you click. id works fine. but when im trying to get the modelUrl i get alsways undefined back. editmodels.js works, so checked that and made this example that sofar i can see normally need to work. Pretty sure its again user error. but i dont see why this dont work with modelUrl. Need to say i tried a few combinations. so excuse me if something is mixedup.

function mousePressEvent(event) 
{
        var pickRay = Camera.computePickRay(event.x, event.y);
        var intersection = Entities.findRayIntersection(pickRay);

          newModel = intersection.entityID;
          var identify = Entities.identifyEntity(newModel);
          
          properties = Entities.getEntityProperties(newModel);
          print(properties.id);
          print(properties.modelUrl);
}

Controller.mousePressEvent.connect(mousePressEvent);

#2

Hey I thought this was going to be for working scripts, not troubleshooting, never mind.

@Richardus the syntax you are looking for is URL (upper case)

as in print(properties.modelURL);


#3

Uff, How could i have missed that one.
i would swear i have tried that, now its working, i knew it where user error… thanks.
I moved this topic also back to support.