Exemplo n.º 1
0
        public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem)
        {
            var e = conversionSystem.GetPrimaryEntity(Entity);

            dstManager.AddComponentData(entity, new Component
            {
                Entity    = conversionSystem.GetPrimaryEntity(Entity),
                Int       = Int,
                BlobAsset = SubSceneLoadTestBlobAsset.Make(Int, Int + 1, gameObject.name, SubSceneLoadTestBlobAsset.MakeStrings(1))
            });
        }
        public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem)
        {
            var buf = dstManager.AddBuffer <Component>(entity);

            for (int i = 0; i < Ints.Count; i++)
            {
                buf.Add(new Component
                {
                    Entity    = conversionSystem.GetPrimaryEntity(Entities[i]),
                    Int       = Ints[i],
                    BlobAsset = SubSceneLoadTestBlobAsset.Make(Ints[i], Ints[i] + 1, gameObject.name + i, SubSceneLoadTestBlobAsset.MakeStrings(i))
                });
            }
        }