From ec734b6f1ef55ac51f9e97a1a7238e66e56e95dd Mon Sep 17 00:00:00 2001 From: APEX FIGHT Date: Thu, 2 Jan 2025 16:21:47 -0500 Subject: [PATCH] client sync behavior script --- Client/Unity/ClientSyncBehavior.cs | 15 +++++++++++++++ Client/Unity/ClientSyncBehavior.cs.meta | 11 +++++++++++ 2 files changed, 26 insertions(+) create mode 100644 Client/Unity/ClientSyncBehavior.cs create mode 100644 Client/Unity/ClientSyncBehavior.cs.meta diff --git a/Client/Unity/ClientSyncBehavior.cs b/Client/Unity/ClientSyncBehavior.cs new file mode 100644 index 0000000..503f01d --- /dev/null +++ b/Client/Unity/ClientSyncBehavior.cs @@ -0,0 +1,15 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class ClientSyncBehavior : MonoBehaviour +{ + + public string id; //the id of the gameobject (as of gameobjectregistry) to synchronize across clients + + void Start() + { + GameObjectRegistry.instance.registeredObjects.Add(new SyncData(transform, id)); + } + +} diff --git a/Client/Unity/ClientSyncBehavior.cs.meta b/Client/Unity/ClientSyncBehavior.cs.meta new file mode 100644 index 0000000..727c537 --- /dev/null +++ b/Client/Unity/ClientSyncBehavior.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3d577c3c9b709324fbfb594192714936 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: