getSyncedMeta
Used to store cross-resource accessible information. This functionality stores an object on a vehicle that can than be set with setSyncedMeta. This can also be accessed on client-side.
This type of meta is accessible anywhere but can only be set on server-side.
Declaration
vehicle.getSyncedMeta(key: string): unknown;
Usage
const result = vehicle.getSyncedMeta('myData');
Real World Example
const data = vehicle.getSyncedMeta('myData');
if (!data) {
// Does does not exist.
return;
}
console.log(data);
These examples assume you have vehicle created or available on server-side