Skip to content

Commit b401131

Browse files
committed
Update GPUInstanceComponent.cs
1 parent e573b39 commit b401131

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Assets/GPUInstanceManager/Runtime/Scripts/Component/GPUInstanceComponent.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ [SerializeField] private ShadowCastingMode
1212
[SerializeField] private bool _receiveShadows = true;
1313
protected override void SendInstanceDataToManager()
1414
{
15+
if (GpuInstanceManager == null)
16+
return;
1517
GpuInstanceManager.AddOrUpdateInstanceData(_targetMeshPair, _targetMaterials,
1618
new KeyValuePair<int, GPUInstanceData>(_targetTransform.GetInstanceID(), _currentData),
1719
_castShadows, _receiveShadows);

0 commit comments

Comments
 (0)