fabriziospadaro / SpriteSheetRenderer

Spritesheet renderer is a powerful Unity ECS API to render massive numbers of sprites using the new dots stack, taking full advantage of Jobs, DynamicBuffers and ComputeBuffer

Home Page:https://www.linkedin.com/in/fabrizio-spadaro/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bulk Spawn With SpriteSheetAnimator

JoeSeger opened this issue · comments

Would you be able to give an example of A bulk spawn using The SpriteSheetAnimator?

I keep running into this error when switching animations.

IndexOutOfRangeException: Index 0 is out of range in DynamicBuffer of '0' Length.
Unity.Entities.DynamicBuffer1[T].CheckBounds (System.Int32 index) (at Library/PackageCache/com.unity.entities@0.8.0-preview.8/Unity.Entities/Iterators/DynamicBuffer.cs:125) Unity.Entities.DynamicBuffer1[T].set_Item (System.Int32 index, T value) (at Library/PackageCache/com.unity.entities@0.8.0-preview.8/Unity.Entities/Iterators/DynamicBuffer.cs:174)
CCZ.Code.SpriteSheetRendererSystem.SpriteSheetRenderer.Systems.MatrixBufferSystem+UpdateJob.Execute (CCZ.Code.SpriteSheetRendererSystem.SpriteSheetRenderer.Components.SpriteMatrix& data, CCZ.Code.SpriteSheetRendererSystem.SpriteSheetRenderer.Components.BufferHook& hook) (at Assets/CCZ/Code/SpriteSheetRendererSystem/SpriteSheetRenderer/Systems/MatrixBufferSystem.cs:19)
Unity.Entities.JobForEachExtensions+JobStruct_Process_CC3[T,T0,T1].ExecuteChunk (Unity.Entities.JobForEachExtensions+JobStruct_Process_CC3[T,T0,T1]& jobData, System.IntPtr bufferRangePatchData, System.Int32 begin, System.Int32 end, Unity.Entities.ArchetypeChunk
chunks, System.Int32
entityIndices) (at Library/PackageCache/com.unity.entities@0.8.0-preview.8/Unity.Entities/IJobForEach.gen.cs:3846)
Unity.Entities.JobForEachExtensions+JobStruct_Process_CC3[T,T0,T1].Execute (Unity.Entities.JobForEachExtensions+JobStruct_Process_CC3[T,T0,T1]& jobData, System.IntPtr additionalPtr, System.IntPtr bufferRangePatchData, Unity.Jobs.LowLevel.Unsafe.JobRanges& ranges, System.Int32 jobIndex) (at Library/PackageCache/com.unity.entities@0.8.0-preview.8/Unity.Entities/IJobForEach.gen.cs:3817)**

Am I doing something wrong to cause this error?