Bunch more networking stuff
This commit is contained in:
@@ -115,6 +115,21 @@ namespace BoneSync.Sync.Components
|
||||
public void OnEnable()
|
||||
{
|
||||
FindComponents();
|
||||
|
||||
bool shouldAutoSync = CheckIfShouldAutoSync();
|
||||
if (shouldAutoSync)
|
||||
{
|
||||
MelonLogger.Msg("AutoSyncing: " + transform.GetPath());
|
||||
RegisterSyncable();
|
||||
}
|
||||
}
|
||||
|
||||
public bool CheckIfShouldAutoSync()
|
||||
{
|
||||
if (poolee && poolee.pool) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public string GetSyncableWorldPath()
|
||||
@@ -151,14 +166,7 @@ namespace BoneSync.Sync.Components
|
||||
public bool CanBeSynced()
|
||||
{
|
||||
FindComponents();
|
||||
if (interactableManager && interactableManager.hosts.Count > 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (interactableHost && interactableHost.hasRigidbody)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (rigidbodies.Length > 0) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user