Answers for "Playcanvas on button click"

0

Playcanvas on button click

var ReportSystem = pc.createScript('reportsystem');

ReportSystem.attributes.add('entity',{type:'entity'});

ReportSystem.prototype.initialize = function() {
    var rs = this.entity.findByName('rsBTN');
    rs.element.on('mouseup', this.onClick, this);
};

ReportSystem.prototype.onClick = function() {
    window.open("https://docs.google.com/forms/d/e/1FAIpQLScI9j-sV2hwUtxk79KCK7WWqAX14eavWB1uWd2HfnHMQEwnmA/viewform?usp=sf_link");
    console.log("link opened");
};
Posted by: Guest on May-26-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language