diff --git a/Examples~/Hybrid Simulation Test Project/ProjectSettings/ProjectVersion.txt b/Examples~/Hybrid Simulation Test Project/ProjectSettings/ProjectVersion.txt index 52099fb..6976c8e 100644 --- a/Examples~/Hybrid Simulation Test Project/ProjectSettings/ProjectVersion.txt +++ b/Examples~/Hybrid Simulation Test Project/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 2020.1.0b5 -m_EditorVersionWithRevision: 2020.1.0b5 (f017efceb459) +m_EditorVersion: 2020.1.0b6 +m_EditorVersionWithRevision: 2020.1.0b6 (255abb3234f8) diff --git a/Runtime/Scripts/MonoBehaviours/Bootstrapper.cs b/Runtime/Scripts/MonoBehaviours/Bootstrapper.cs index 94b7863..f348f5a 100644 --- a/Runtime/Scripts/MonoBehaviours/Bootstrapper.cs +++ b/Runtime/Scripts/MonoBehaviours/Bootstrapper.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using Software10101.DOTS.Archetypes; using Software10101.DOTS.Data; using Software10101.DOTS.Systems; @@ -35,7 +34,7 @@ public class Bootstrapper : WorldBehaviour { [SerializeField] private ArchetypeProducer[] _prefabs = null; private EntityArchetype[] _prefabArchetypes = null; - private readonly Dictionary _prefabIndices = new Dictionary(); + private readonly Dictionary _prefabIndices = new Dictionary(); [SerializeField] private SystemTypeReference[] _simulationSystems = new SystemTypeReference[0]; @@ -71,7 +70,7 @@ protected virtual void Start() { for (int i = 0; i < _prefabs.Length; i++) { ArchetypeProducer p = _prefabs[i]; _prefabArchetypes[i] = p.Produce(entityManager); - _prefabIndices[p.Prefab.gameObject] = i; + _prefabIndices[p] = i; } } @@ -79,11 +78,7 @@ internal EntityMonoBehaviour GetPrefab(int prefabIndex) { return _prefabs[prefabIndex].Prefab; } - public (Entity, EntityCommandBuffer) Create(Component prefab) { - return Create(_prefabIndices[prefab.gameObject]); - } - - public (Entity, EntityCommandBuffer) Create(GameObject prefab) { + public (Entity, EntityCommandBuffer) Create(ArchetypeProducer prefab) { return Create(_prefabIndices[prefab]); } diff --git a/package.json b/package.json index b03c4f1..63da242 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "com.10101software.dots.hybridsimulation", "description": "A framework for using FixedUpdate in a simulation world which is linked to a GameObject-based presentation layer.", - "version": "0.2.1", + "version": "0.3.0", "unity": "2020.1", "displayName": "DOTS Hybrid Simulation Worlds", "dependencies": {