A Unity plugin for easily binding fundamental properties of a class to the Normal's Normcore networking module. The plugin provides a generic networking model that can be configured and connected to sync multiple properties of classes over the network.
To simplify, this further simplifies the simplest networking framework. That simple! 😎
Compatibility: Unity 2019.3 or above || Normcore 2.0
-
Only public property can be bound. Private or public variables are not accessible to binder script. Hence convert the variables to sync into properties.
-
For every property to sync, use the new
Realtime<T>Sync
script. Let's say,If you have twofloat
properties to sync, then use two differentRealtimeFloatSync
scripts. A single script has only one variable which syncs with the model. All the bound property hooks to this variable of the script.
Example: Networking two different properties of Player
Script.
- You can use also bind multiple properties to a single
Realtime<T>Sync
script. This will hook the values of the various properties to the value of the model. A useful feature to synchronize UI with their functionalities.
In the example below, the networked float value is bound to the Slider
, the scale of Yellow Cube
, and Blue Cube
. All three will have a single value, and changing one value will affect the others.
-
I'm getting a bunch of package errors This project is based on Normcore 2.0 which is currently in preview and there is constant development going on. The best way to solve those errors is to close the unity, delete the library folder, and then restarting the Unity.
-
Timeout error For easy out of the box play experience, I've kept my Normcore App key in the project, which means if too many people try the project, will count towards the monthly limited quota. My suggestion, use your app key. You can get it from the Normcore dashboard.
-
Can I attach
n
different variables to a singleRealtime<T>Sync
script? If you intend to store different values to those variables, then usen
different scripts. If thosen
variables will have the same value, then attach them to a single script and use binders. -
What is
Float to Vector3 Property Binder
? How does it work? I came across some use-cases which essentially uses float for vector3-(x,x,x). In such cases this is useful. If the float value changes tox
it will update the vector to(x,x,x)
. Vice versa if the vector'sx
property is changed toy
then it will update the float. Note that the change in the value ofy
andz
won't be reflected. More property binders like float to color are coming soon.