Skip to content

Instantly share code, notes, and snippets.

@jeffvella
Created April 10, 2020 14:58
Show Gist options
  • Select an option

  • Save jeffvella/f844cc4aab5b5a9f308e9c27148f5cdf to your computer and use it in GitHub Desktop.

Select an option

Save jeffvella/f844cc4aab5b5a9f308e9c27148f5cdf to your computer and use it in GitHub Desktop.
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. */
protected override void OnCreate()
{
World.GetOrCreateSystem<CopySkinnedEntityDataToRenderEntity>().Enabled = false;
Enabled = false;
World.DestroySystem(this);
}
protected override void OnUpdate() => throw new System.NotImplementedException();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment