Skip to content

Commit

Permalink
Update to new SpatialHashContainer API
Browse files Browse the repository at this point in the history
  • Loading branch information
mtschoen-unity committed Feb 11, 2020
1 parent c40e022 commit 660f1a9
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class DirectIntersection
readonly Dictionary<Transform, bool> m_RayOriginEnabled = new Dictionary<Transform, bool>();
Coroutine m_UpdateCoroutine;

SpatialHashContainer m_SpatialHashContainer;
SpatialHashContainer<Renderer> m_SpatialHashContainer;
MeshCollider m_CollisionTester;

public Func<GameObject, bool> shouldExcludeObject { private get; set; }
Expand Down Expand Up @@ -81,7 +81,7 @@ public void Initialize()
if (m_SpatialHashModule != null)
{
m_SpatialHashModule.Clear();
m_SpatialHashContainer = m_SpatialHashModule.spatialHashContainer;
m_SpatialHashContainer = m_SpatialHashModule.GetOrCreateContainer<Renderer>();
}

m_IntersectedObjects.Clear();
Expand Down Expand Up @@ -134,7 +134,7 @@ IEnumerator UpdateDynamicObjects()
k_ChangedObjects.Clear();

// TODO AE 9/21/16: Hook updates of new objects that are created
var allObjects = m_SpatialHashContainer.GetObjects<Renderer>();
var allObjects = m_SpatialHashContainer.GetObjects();
foreach (var obj in allObjects)
{
if (!obj)
Expand Down

0 comments on commit 660f1a9

Please sign in to comment.