Esempio n. 1
0
        public void FixedArrayFromEntityWorks()
        {
            var entityInt = m_Manager.CreateEntity(ComponentType.FixedArray(typeof(int), 3));

            m_Manager.GetFixedArray <int>(entityInt).CopyFrom(new int[] { 1, 2, 3 });

            var intLookup = EmptySystem.GetFixedArrayFromEntity <int>();

            Assert.IsTrue(intLookup.Exists(entityInt));
            Assert.IsFalse(intLookup.Exists(new Entity()));

            Assert.AreEqual(2, intLookup[entityInt][1]);
        }