#Bug in NetcodeSamples - Predicted spawning sample 02

1 messages · Page 1 of 1 (latest)

dusky leaf
#

In the ClassificationSystem the following is incorrect

for (int i = 0; i < ghostPrefabTypes.Length; ++i) { if (ghostPrefabTypes[i].GhostPrefab == prefabEntity) m_GhostType = ghostPrefabTypes[i].GhostType.GetHashCode(); }

it should instead be

for (int i = 0; i < ghostPrefabTypes.Length; ++i) { if (ghostPrefabTypes[i].GhostPrefab == prefabEntity) m_GhostType = i; }

as the GhostType in this case refers to the index in the GhostCollectionPrefab singleton collection, not a unique identifier hashcode.