RoyNexus
RoyNexus
NNormal
Created by RoyNexus on 7/19/2024 in #🤝ask-a-question
Is checking Realtime.clientID == 0 the best way to identify if I'm on offline mode?
I want to use Realtime API to identify if I'm on offline mode. The only way I see in the docs to do this is to check for Realtime.clientID == 0 is this correct? Is there other way to do this without custom code? Docs: https://normcore.io/documentation/room/offline-mode#things-to-know
4 replies
NNormal
Created by RoyNexus on 5/21/2024 in #🤝ask-a-question
How can I have a singleton custom Realtime Component in scene
I have an instance of a custom Realtime Component syncing data over the network. Here's what I want: 1- When first client connects, it instantiates the Component's model to an initial data state. 2 - When the second client connects, it should detect that the same Component's model's was already instantiated with a default state by the first client, so this second client only has to replicate the state on the scene. I've done experiments with the isFreshModel flag inside the OnRealtimeModelReplaced function but, for the second client it seems to be called twice, once when it first connects, and has a default valued currentModel. And then a second time, when it gets the actual data set by the first client. This behaviour seems odd, I would expect the currentModel have the data set up by the first client filled in on the first OnRealtimeModelReplaced call. Am I thinking of the sync model lifecycle wrong? How can I accomplish the desired behaviour described above?
9 replies
NNormal
Created by RoyNexus on 5/9/2024 in #🤝ask-a-question
What's the best practice to keep out normal API app key secret from users?
We have two issues: 1. How we make sure all project collaborators can still keep a local key without Unity breaking references to the NormcoreAppSettings file? (This file is not git tracked) 2. How do we deploy binaries to clients without sharing that secret key?
8 replies