How to add a TrueSyncBehaviour derived component at run time

We have a need to add a TrueSyncBehaviour derived component at run time, however when doing so synced update is not called.

I assume we need to do some sort of registration. We have tried calling TrueSyncManager.RegisterITrueSyncBehaviour but that did not work.
Can you help out?

Answers

  • Hi @Geminior,

    This happens because a fresh TSBehaviour don't belongs to any player, so we didn't call OnSyncedUpdate there. Currently we only allow assigne a new owner right after you call SyncedInstantiate of a TrueSyncBehaviour, you can see a example in the script "SimpleControl.cs".