Access custom entity properties?


#1

Has anyone got any pointers on how to add your own properties to an entity then access them from server-side script or other entities?

For example, if a sphere entity had a new custom property added called formula via an attached script. Then from a cube entity attached script we wanted to change the formula value on the sphere entity.

I found this about accessing out-of-box entity properties, but not custom ones.
https://alphas.highfidelity.io/t/entity-properties/909/2


#2

You do have the custom properties variable “userData” that can be set to be a Json object (with multiple variables inside it) as well… See for example the phonebooth teleporter portal.js. Maybe you could do something to do with that?


#3

Awesome . Thanks for the pointer.