Access custom entity properties?


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.


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?


Awesome . Thanks for the pointer.