Player Persistent Variables not saving from Published World (works in Editor)
Not sure if this is the best place to post this, but we are running into an issue with our player persistent variables not saving data between sessions while a player is in our recently Published world. We have confirmed the following: Saving and loading works fine in the Editor (and has for months), including between sessions. Saving something from an Editor for a player does successfully get loaded by that player in a Published session. Nothing is being saved from the Published world back to our player persistent variables. Has anyone else encountered an issue like this? Or is there potentially a configuration step we missed when publishing?Solved97Views0likes7CommentsPlayer Persistent Variables still initializing...
Hello everyone, I'm encountering a frustrating issue while using Persistent Player Variables (PPVs). I have created three Number PPVs (let's call them A, B, and C), but only one of them is successfully loading its value. I am accessing these variables using the standard synchronous method (this.world.persistentStorage.getPlayerVariable(...)). The following line of code, called in my Script 1, consistently generates the warning, and returns the default value (0): const recoilMultiplier = 1 + this.props.multiplierSnap * this.world.persistentStorage.getPlayerVariable(this.player, PersistentVariables_Data.playerPersistentVariables.number.recoilMultiplier); Warning Message: Player persistent variables still initializing... Returning empty state In my Script 2 (which runs successfully later in the game cycle), I access the other two variables: const knockbackMultiplier = 1 + this.props.multiplierSnap * this.world.persistentStorage.getPlayerVariable(shooter, PersistentVariables_Data.playerPersistentVariables.number.knockbackMultiplier); const resistanceMultiplier = 1 - this.props.multiplierSnap * this.world.persistentStorage.getPlayerVariable(player, PersistentVariables_Data.playerPersistentVariables.number.resistanceMultiplier); Variable A (knockbackMultiplier) is loading correctly. No warning. Variable B (resistanceMultiplier) is generating the same warning message. I created all three PPVs (A, B, and C) the exact same way at the same time in the World Editor. They are all defined as Number PPVs. I don't understand why two of them are throwing the still initializing warning while the third one works perfectly, despite all being called using the same mechanism. Has anyone experienced this specific issue where two out of three PPVs are stuck in the "initializing" state? Could this be related to a null initial value or a server-side cache lock specific to my user profile for these variables? Any insight would be greatly appreciated! Thank you.72Views0likes3CommentsVariable Groups disappear from Editor System panel list?
I'm trying to work with "Variable Groups". Now I have 2 owned Groups added in my World, so that I can see them from "System/Variable Groups" both under filter "Added to World" and "Owned by me". Test-1, I tried to add or remove some Variable in one Group. That's say, if I have 3 Variables, outer Groups list shows "3" vars under the group name, and "3/150" shown at the header of inner Variable list. When I add 1 var, they become "4" & "4/150", so far so good. But when I delete 1 var, they become "4" & "3/150", the outer info is wrong. (Okay, it maybe just a text.) Test-2, I tried adding over 150 variables, I add 10, delete 3, add 143, now it's 150. The 151-th var can't be added as expected, and texts show "153" & "150/150" as Test-1. After my testings, I'd like to dump the unused testing Group. I click "Remove from World" from the "Added to World" list, without "Delete" from "Owned by me" yet. BUT, THE OOPS HAPPEN!! The "System/Variable Groups" shows NOTHING but empty msg!? I tried "re-enter World", "re-open Editor", "re-start Windows, "re-login Account", "re-install Editor", but nothing help. it becomes UNABLE to see, add, edit any of Variable Groups now. Btw, in my real case, I have another existed Group which shared and added to a collaborating World owned by other colleague. I cannot see any Variable Group in any World from my Editor(s), includes 2 PC logged-in with my account. But, my colleague, who can still see & edit my shared or their other Groups. Thanks a lot for any help.Solved33Views0likes2CommentsGrabbables becomes no longer grabbable randomly.
I am using a script which moves bunch of grabbables at preset positions. How every after moving they are no longer grabbable event they are set to grabbable. And no im not change any grabbable properties before/after moving. Would love some clarifications.36Views0likes1CommentCause of laggy worlds and kicking players out
So I think I figured out why many worlds are laggy and kicking people out. LEADERBOARDS. In 3 worlds of mine and another I'm working on that became super laggy, high crash rates, hitch fraction on June 28th. I deleted all the LEADERBOARDS, everything about them (ie, Physical objs that display, any script references, and the variables in the Leaderboard tab of the console). All 3 worlds now run flawlessly. For now I can create in session "leaderboards", but they will only show historical data for those in the session based on the ppvs. So if your worlds became laggy, kicking people out on or about June 28th, I recommend deleting everything associated with the built in Leaderboards. How Meta has not "discovered" this by now is disappointing. Good news, historical data will continue to be saved in ppvs, just not displayable until they figure out what happened to them. If this indeed is the cause of the issues so many are having i think I need to come to Connect to further explore remedies ððĪŠðð32Views3likes0CommentsObject Spawning and Despawning?
Hey everyone can anyone tell me if object spawning and despawning will work for this objective. I want to create an asset that works as a trigger another item and when you untouch it the item disappears? So an example I create a book.... A player touches it and it opens a page large so that they can read it and when they untouched a book or after several seconds the page disappears? Is object spawning and despawning the way to do this or is this not possible? Thanks, VR_Adventures361Views0likes4CommentsNeat Little PPV Trick
I have been seeing some people having trouble with the naming convention of PPV IDs. There is a new (Not sure when it was added) button that makes this really easy. Go to the PPV in the Variable Group panel and copy it so you can paste it into the code. Here is a picture of what I am talking about.624Views20likes1CommentGlobal Cross World Storage
Hello! I'm working on various scripts to learn the capabilities of the Horizon Desktop editor. I haven't found any information on cross-world, cross-player "global" storage that I can reference in my world. For example, let's say I want to build a system where users could "vote" for Option A or Option B, and at the end of the week, the Option with the most votes wins, and some text is updated. I cannot use player-specific storage for their votes, nor to store the total votes Option A has received across users, and across instances of the world. I'm also not sure how an instantiated class on a Script could keep that state across users either, since (my understanding is) all scripts that are attached to entities are run client-side. Am I missing something? What kind of strategy could I use to manage something like that? I feel like I've seen gizmos and other tools in worlds that can independently manage their own leaderboards outside of the "leaderboard" tool.539Views3likes5CommentsOpen Custom UI Panel Via Button Press
Im not sure if this was asked already but how would one go about using the quest controller specific buttons (A,B,X,Y) to open up a ui panel in a horizon world ? Example: When Y is pressed then menu interface shows up, when Y is pressed again the interface closesSolved480Views1like3CommentsCan't get or set VariableGroup variables
Hello! I am extremely new to development (using the Desktop Editor), and I wanted to try a quick world that just enables a button that, when pressed, updates a player's score using NetworkBroadcastEvents and Variable Groups. Here's what I've got: A VariableGroup called `PlayerAttributes` with `test` and `localScore` Which I then try to reference in a Typescript file: // names of the variable group and persistent variable containing player data const varGroupName: string = "PlayerAttributes"; const varName: string = "localScore"; // Set as a Number const varKey: string = `${varGroupName}:${varName}`; export type ButtonPressedType = { player: Player } class ScoreManager extends hz.Component<typeof ScoreManager> { static propsDefinition = {}; start() { this.connectNetworkBroadcastEvent(NetworkEvents.buttonPressed, (data: ButtonPressedType) => { console.log('Button pressed by player', data.player.id); const curScore = Number(this.world.persistentStorage.getPlayerVariable(data.player, 'PlayerAttributes:localScore')); console.log('Current score:', curScore) this.world.persistentStorage.setPlayerVariable(data.player, 'PlayerAttributes:localScore', curScore + 1) console.log('Player', data.player.id, 'score:', curScore + 1) }) } } hz.Component.register(ScoreManager); But every time I send the network event, I get the following: Can't set value for PlayerAttributes:localScore. PlayerAttributes:localScore was deleted or never existed. Go to Systems tab in creation UI to confirm. What am I doing wrong?Solved551Views1like4Comments