This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Unity.Entities; | |
| using Unity.Rendering; | |
| // https://answers.unity.com/questions/1695108/boneindexoffset-error-with-usdz-model-and-ecs.html | |
| [UpdateInGroup(typeof(InitializationSystemGroup))] | |
| public class BugFixCopySkinnedEntityData : SystemBase | |
| { | |
| /* Suppresses the error: "ArgumentException: A component with type:BoneIndexOffset | |
| * has not been added to the entity.", until the Unity bug is fixed. */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Test, TestCategory(TestCategory.Integrity)] | |
| public void EnqueuesToCorrectThread([Values(1, 10, 100)] int jobCount, [Values(1, 2, 10)] int numPerThread) | |
| { | |
| var threadIds = new NativeArray<int>(jobCount, Allocator.TempJob); | |
| var threadUsages = new NativeArray<int>(JobsUtility.MaxJobThreadCount, Allocator.TempJob); | |
| var (baseQueue, componentQueue, bufferQueue) = new QueueRig<EcsTestData, EcsIntElement>(Allocator.TempJob); | |
| try | |
| { | |
| var handle = IJobParallelForExtensions.Schedule(new EnqueuesToCorrectThreadJob |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using Unity.Collections; | |
| using Unity.Collections.LowLevel.Unsafe; | |
| using Unity.Entities; | |
| namespace Assets.Scripts.Providers | |
| { | |
| public interface INativeProvider | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Test1 : SystemBase | |
| { | |
| protected override void OnUpdate() | |
| { | |
| var someCDFE = GetComponentDataFromEntity<Translation>(); | |
| int externalVal = 2; | |
| Entities.ForEach((Entity e) => | |
| { | |
| var a = someCDFE[e]; | |
| if (externalVal == 2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Assets.Scripts.Components; | |
| using Assets.Scripts.Components.Events; | |
| using Unity.Collections; | |
| using Unity.Entities; | |
| using Unity.Mathematics; | |
| using Unity.Transforms; | |
| using Vella.Events; | |
| namespace Assets.Scripts.Systems | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://gist.githubusercontent.com/jeffvella/fc9e674b7edd02e8a343929256087764/raw/cc85a155b32df303500f00f798eeb786431d0eb6/gistfile1.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protected override void OnUpdate() | |
| { | |
| var collisionEvents = _collisionEvents; | |
| var detectors = _buffer; | |
| detectors.Clear(); | |
| Entities.ForEach((Entity entity, ref CollisionDetector detector, in Translation pos, in OwnerRef owner) => | |
| { | |
| detectors.Add(new DetectorInfo | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using NUnit.Framework; | |
| using System; | |
| using System.Diagnostics; | |
| using System.Linq; | |
| using Unity.Collections; | |
| using Unity.Entities; | |
| using Unity.PerformanceTesting; | |
| namespace Packages.com.vella.events.Tests | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using NUnit.Framework; | |
| using System; | |
| using System.Diagnostics; | |
| using System.Linq; | |
| using Unity.Collections; | |
| using Unity.Entities; | |
| using Unity.PerformanceTesting; | |
| namespace Packages.com.vella.events.Tests | |
| { |