AbstractStaticinitStaticopenStaticopenStaticopenStaticeditStaticpromptStaticopenStaticopenStaticopenStaticregisterRegister (or extend) the known property defaults for this project.
Call once during startup after your project’s DPRegistry augmentation is loaded.
A partial or full set of defaults keyed by PropertiesType.
get when the dynamic property isn’t set yet.StaticgetRead a dynamic property from an Entity or the World. Returns the stored value if present; otherwise returns the registered default. Result is cached for subsequent reads.
The read source (entity or world).
The property key (autocomplete from DPRegistry).
The typed value for the given key.
const hasBook = DPUtil.get(player, "HasBook"); // boolean
const ver = DPUtil.get(world, "currentVersion"); // string (from Core)
DP.get:<key>.StaticsetWrite a dynamic property to an Entity or the World.
Also updates the in-memory cache. Passing undefined removes the property.
The write target (entity or world).
The property key (autocomplete from DPRegistry).
The new value, or undefined to delete.
DPUtil.set(player, "HasBook", true);
DPUtil.set(world, "currentVersion", "1.2.3");
// Remove a value so future reads fall back to the registered default
DPUtil.set(player, "HasBook", undefined);
DP.set:<key>.string | number | boolean | Vector3 | undefined.
Deprecated