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.

Please run function in RunTransaction on the unity main thread

See original GitHub issue

When we call RunTransaction it cannot use GameObject.GetComponent and other function that need to call in unity main thread. Please run function callback in RunTransaction in the unity main thread

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (12 by maintainers)

github_iconTop GitHub Comments

3reactions
Thainacommented, Nov 22, 2018

@stewartmiles And when will you expose that FirebaseHandler.RunOnMainThread ?

1reaction
chkuang-gcommented, May 22, 2019

@Thaina According to the code we have, it should be called from the main thread anyway… I’ll open an investigation to see why it is not.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't get RunTransaction with Firebase in Unity to work
1 Answer 1 ... This is just a guess but it might be related to threading. In newer .Net version ContinueWith might end...
Read more >
Can only be called from the main thread
Hi, I use Firebase with Unity and I get errors like this ( in Visual Studio -- Unity doesn't throw any errors at...
Read more >
Transactions and batched writes | Firestore - Firebase - Google
This feature ensures that the transaction runs on up-to-date and consistent data. Transactions never partially apply writes. All writes execute at the end...
Read more >
How to not freeze the main thread in Unity?
I have a level generation algorithm that is computationally heavy. As such, calling it always results in the game screen freezing. How can...
Read more >
Is this possible? Help with firebase transactions in my Unity ...
The problem I think I have is, for each coin the user collects, I am running a transaction to update the user's total...
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