mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-06 01:00:16 +00:00
Check worldobjectmanager is ready before doing stuff
This commit is contained in:
parent
d09717c06f
commit
44e1729c85
@ -23,6 +23,11 @@ namespace QSB.SectorSync
|
||||
|
||||
public void Invoke()
|
||||
{
|
||||
if (!Instance.IsReady || !AllReady)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (var sync in SectoredTransformSyncs)
|
||||
{
|
||||
if (sync.AttachedObject == null)
|
||||
|
@ -38,6 +38,11 @@ namespace QSB.WorldSync
|
||||
where TWorldObject : WorldObject<TUnityObject>
|
||||
where TUnityObject : MonoBehaviour
|
||||
{
|
||||
if (!WorldObjectManager.AllReady)
|
||||
{
|
||||
return default;
|
||||
}
|
||||
|
||||
if (unityObject == null)
|
||||
{
|
||||
DebugLog.ToConsole($"Error - Trying to run GetWorldFromUnity with a null unity object! TWorldObject:{typeof(TWorldObject).Name}, TUnityObject:{typeof(TUnityObject).Name}.", MessageType.Error);
|
||||
|
Loading…
Reference in New Issue
Block a user