Overlays.getOverlayObject() is being removed from the API


The Overlays.getOverlayObject() JavaScript API function is not used in any High Fidelity scripts. So, unless there is objection, it is deprecated and will be removed from the API after a couple of releases.


Not even sure what that one did, considering getProperties exists too


I wish these were put somewhere else than the forums, Cause now I have just run until this being removed which breaks my vrTool which uses it for the eventbridge connection. If there is another way to do this on a web3d overlay please let me know.


@FluffyJenkins How have you been using Overlays.getOverlayObject(), exactly? Perhaps code snippets of the overlay creation and the use of the Overlays.getOverlayObject() value, each side of the event bridge?

obj = Overlays.getOverlayObject(vrToolOverlay_TOOL);


Thanks. And vrToolOverlay_TOOL was created using what function call?


vrToolOverlay_TOOL = Overlays.addOverlay(‘web3d’, {
visible: true,
url: “about:blank”,
dpi: 68,
dimensions: Vec3.multiply(MyAvatar.sensorToWorldScale,PANEL_SIZE),
parentID: MyAvatar.sessionUUID,
parentJointIndex: jointI,
showKeyboardFocusHighlight: false,
localPosition: {x: 0, y: 0.0, z: -0.095},
localRotation: Quat.fromPitchYawRollDegrees(0, 180, -90),
alpha: 1


Thanks. I’m having a look.


I couldn’t find a work-around, unfortunately.

I’ve submitted the following PR which reinstates the function: https://github.com/highfidelity/hifi/pull/12689


Hi David.

My team is also making use of Overlays. If this aspect of the API is getting removed; what is the anticipated work-around?

Thanks in advance.


The PR has been merged and will be available in release 67.