Adding a screen component

Hi,

A simple question for you guys:
How do I create ‘2d screen’ element and attach it to root programmatically? I did here:
https://playcanvas.com/editor/scene/586175

like:
var Ui = pc.createScript(‘ui’);

// initialize code called once per entity
Ui.prototype.initialize = function() {
var screenEntity = new pc.ScreenComponent(new pc.ScreenComponentSystem(this.app), this.entity);
screenEntity.screenSpace = true; // for 2d screen
screenEntity.scaleMode = pc.SCALEMODE_NONE;
};

But, I got error in the console: ComponentSystem name ‘screen’ already registered or not allowed.

Ah… I am stupid. It should be an empty entity with the screen component. Never mind.