Hi dears, I’m new to the Unity forum!
I want to ask about the saved variables used by Visual Scripting, and I want to know where they are really saved: I read that these are saved directly in the playerprefs but when I call the “DeleteAll” function they are not really deleted. I opened the registry and calling the specific function this deletes the “ludiqSavedVariable” file but the data related to the saved variable remain.
I noticed that the saved variables are reset by manually deleting the “Unity_player_session” files in the same root as the playerprefs.
How can these variables be handled correctly?
Will follow this with interest
no one have the right sol…XD
// Should show current saved data
Debug.Log(PlayerPrefs.GetString("LudiqSavedVariables"));
// Set data to none and save
PlayerPrefs.SetString("LudiqSavedVariables", "");
PlayerPrefs.Save();
// Should show current saved data as none
Debug.Log(PlayerPrefs.GetString("LudiqSavedVariables"));
This thing just broke my project:
ArgumentNullException: Value cannot be null.
Parameter name: source
System.Linq.Enumerable.Select[TSource,TResult] (System.Collections.Generic.IEnumerable1[T] source, System.Func
2[T,TResult] selector) (at :0)
Unity.VisualScripting.SavedVariables.MergeInitialAndSavedDeclarations () (at ./Library/PackageCache/com.unity.visualscripting@1.8.0/Runtime/VisualScripting.Core/Variables/SavedVariables.cs:135)
Unity.VisualScripting.SavedVariables.OnEnterPlayMode () (at ./Library/PackageCache/com.unity.visualscripting@1.8.0/Runtime/VisualScripting.Core/Variables/SavedVariables.cs:54)
Unity.VisualScripting.RuntimeVSUsageUtility.RuntimeInitializeOnLoadBeforeSceneLoad () (at ./Library/PackageCache/com.unity.visualscripting@1.8.0/Runtime/VisualScripting.Core/Utilities/RuntimeVSUsageUtility.cs:18)
The recently revived Bolt Community addons now have nodes for this:
For future victims: It said the registry cannot be null so I just edited the registry and added number 10. It’s not null now so the project runs seemingly smoothly. I’ll watch for future troubles this may bring.
yea i am also working on a node to clear a single variable and i might add it like in the current state it works you just dont see it visually until you end the game and start it again since it clears all variables and Re adds them excluding the set variable so i just want to fix that