docs.unity.cn
    Show / Hide Table of Contents

    Class JobComponentSystem

    An abstract class to implement in order to create a system that uses ECS-specific Jobs.

    Inheritance
    Object
    ComponentSystemBase
    JobComponentSystem
    CompanionGameObjectUpdateTransformSystem
    CompositeRotationSystem
    CompositeScaleSystem
    CopyInitialTransformFromGameObjectSystem
    CopyTransformFromGameObjectSystem
    CopyTransformToGameObjectSystem
    LocalToParentSystem
    ParentScaleInverseSystem
    ParentSystem
    PostRotationEulerSystem
    RotationEulerSystem
    TRSToLocalToParentSystem
    TRSToLocalToWorldSystem
    WorldToLocalSystem
    Inherited Members
    ComponentSystemBase.Enabled
    ComponentSystemBase.EntityQueries
    ComponentSystemBase.GlobalSystemVersion
    ComponentSystemBase.LastSystemVersion
    ComponentSystemBase.EntityManager
    ComponentSystemBase.World
    ComponentSystemBase.Time
    ComponentSystemBase.OnCreateForCompiler()
    ComponentSystemBase.OnCreate()
    ComponentSystemBase.OnStartRunning()
    ComponentSystemBase.OnStopRunning()
    ComponentSystemBase.OnDestroy()
    ComponentSystemBase.ShouldRunSystem()
    ComponentSystemBase.GetComponentTypeHandle<T>(Boolean)
    ComponentSystemBase.GetDynamicComponentTypeHandle(ComponentType)
    ComponentSystemBase.GetBufferTypeHandle<T>(Boolean)
    ComponentSystemBase.GetSharedComponentTypeHandle<T>()
    ComponentSystemBase.GetDynamicSharedComponentTypeHandle(ComponentType)
    ComponentSystemBase.GetEntityTypeHandle()
    ComponentSystemBase.GetComponentDataFromEntity<T>(Boolean)
    ComponentSystemBase.GetBufferFromEntity<T>(Boolean)
    ComponentSystemBase.RequireForUpdate(EntityQuery)
    ComponentSystemBase.RequireSingletonForUpdate<T>()
    ComponentSystemBase.HasSingleton<T>()
    ComponentSystemBase.GetSingleton<T>()
    ComponentSystemBase.TryGetSingleton<T>(T)
    ComponentSystemBase.SetSingleton<T>(T)
    ComponentSystemBase.GetSingletonEntity<T>()
    ComponentSystemBase.TryGetSingletonEntity<T>(Entity)
    ComponentSystemBase.GetEntityQuery(ComponentType[])
    ComponentSystemBase.GetEntityQuery(NativeArray<ComponentType>)
    ComponentSystemBase.GetEntityQuery(EntityQueryDesc[])
    Namespace: Unity.Entities
    Syntax
    public abstract class JobComponentSystem : ComponentSystemBase
    Remarks

    Implement a JobComponentSystem subclass for systems that perform their work using IJobForEach<T0> or IJobChunk.

    Properties

    Name Description
    Entities

    Use Entities.ForEach((ref Translation translation, in Velocity velocity) => { translation.Value += velocity.Value * dt; }).Schedule(inputDependencies);

    Job

    Use Job.WithCode(() => { YourCodeGoesHere(); }).Schedule(inputDependencies);

    Methods

    Name Description
    OnUpdate(JobHandle)

    Implement OnUpdate to perform the major work of this system.

    Update()

    Extension Methods

    ComponentSystemBaseManagedComponentExtensions.HasSingleton<T>(ComponentSystemBase)
    ComponentSystemBaseManagedComponentExtensions.GetSingleton<T>(ComponentSystemBase)
    ComponentSystemBaseManagedComponentExtensions.SetSingleton<T>(ComponentSystemBase, T)
    JobForEachExtensions.GetEntityQueryForIJobForEach(ComponentSystemBase, Type)

    See Also

    ComponentSystem
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on Friday, May 28, 2021