showing results for - "playcanvas on button click"
Claudio
15 Mar 2020
1var ReportSystem = pc.createScript('reportsystem');
2
3ReportSystem.attributes.add('entity',{type:'entity'});
4
5ReportSystem.prototype.initialize = function() {
6    var rs = this.entity.findByName('rsBTN');
7    rs.element.on('mouseup', this.onClick, this);
8};
9
10ReportSystem.prototype.onClick = function() {
11    window.open("https://docs.google.com/forms/d/e/1FAIpQLScI9j-sV2hwUtxk79KCK7WWqAX14eavWB1uWd2HfnHMQEwnmA/viewform?usp=sf_link");
12    console.log("link opened");
13};
14