using System.Collections.Generic; using Unity.Entities; using Unity.Transforms; namespace Unity.NetCode.Samples { /// Registers the default variants for all samples. Since multiple user-defined variants are present for the /// Transform components, we must explicitly define a default, and how it applies to components on child entities. [CreateBefore(typeof(TransformDefaultVariantSystem))] sealed partial class DefaultGhostVariantSystem : DefaultVariantSystemBase { protected override void RegisterDefaultVariants(Dictionary defaultVariants) { defaultVariants.Add(typeof(LocalTransform), Rule.OnlyParents(typeof(TransformDefaultVariant))); } } }