question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update function not working

See original GitHub issue

Given a “data.json” file with:

"worlds": [
    {
        "id": 0,
        "position": [
            3.6640577,
            5.5219193,
            3.4788187
          ],
         "cameraRotationX": -0.66699946,
         "cameraRotationY": -0.003000007
    }
]

Running the following update code:

var collection = gameStore.GetCollection("worlds");
await collection.UpdateOneAsync(e => e.id == 0, new { position = new float[] { 10, 10, 10} } );

The database does not save the update and will remain the same as the above mentioned example. This code was pulled directly from the docs. Is there something I missed? I tried out any other update function I could find in the docs as well with the same results.

Current solution is to delete and re-insert the entry.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ttucommented, Jun 13, 2021

@EricBellamy New version is now released https://www.nuget.org/packages/JsonFlatFileDataStore/2.2.3

Have a nice summer!

0reactions
EricBellamycommented, Jul 9, 2021

Thank you so much! I saw the repo update but missed this notification. I hope you have a good summer as well and stay safe! 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Update function is not getting called
I'm not new to unity (although I'm not a pro either) and my Update() function is not running. The object is instantiated during...
Read more >
c# - Unity Update() not called
Unity update doesnt work at all,. The gameobject is enabled. The script derives from monobehavior. Start() works normally
Read more >
unity - Update() method never called
I deleted the Start() and Update() methods from my derived class. I discovered something new: The Update() method in BlinkingBehaviour is never ......
Read more >
MonoBehaviour.Update() - Scripting API
Update is the most commonly used function to implement any kind of game script. Not every MonoBehaviour script needs Update .
Read more >
How to use Fixed Update in Unity
Learn how to use Fixed Update in Unity, how it works & when to use it instead of Update, in my in-depth guide....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found