Class SystemBase | Entities | 0.6.0-preview.24
docs.unity.cn
    Show / Hide Table of Contents

    Class SystemBase

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

    Inheritance
    Object
    ComponentSystemBase
    SystemBase
    Inherited Members
    ComponentSystemBase.Enabled
    ComponentSystemBase.EntityQueries
    ComponentSystemBase.GlobalSystemVersion
    ComponentSystemBase.LastSystemVersion
    ComponentSystemBase.EntityManager
    ComponentSystemBase.World
    ComponentSystemBase.Time
    ComponentSystemBase.OnCreateForCompiler()
    ComponentSystemBase.OnCreate()
    ComponentSystemBase.OnDestroyManager()
    ComponentSystemBase.OnCreateManager()
    ComponentSystemBase.OnStartRunning()
    ComponentSystemBase.OnStopRunning()
    ComponentSystemBase.OnDestroy()
    ComponentSystemBase.ShouldRunSystem()
    ComponentSystemBase.GetArchetypeChunkComponentType<T>(Boolean)
    ComponentSystemBase.GetArchetypeChunkComponentTypeDynamic(ComponentType)
    ComponentSystemBase.GetArchetypeChunkBufferType<T>(Boolean)
    ComponentSystemBase.GetArchetypeChunkSharedComponentType<T>()
    ComponentSystemBase.GetArchetypeChunkEntityType()
    ComponentSystemBase.GetComponentDataFromEntity<T>(Boolean)
    ComponentSystemBase.GetBufferFromEntity<T>(Boolean)
    ComponentSystemBase.RequireForUpdate(EntityQuery)
    ComponentSystemBase.RequireSingletonForUpdate<T>()
    ComponentSystemBase.HasSingleton<T>()
    ComponentSystemBase.GetSingleton<T>()
    ComponentSystemBase.SetSingleton<T>(T)
    ComponentSystemBase.GetSingletonEntity<T>()
    ComponentSystemBase.GetEntityQuery(ComponentType[])
    ComponentSystemBase.GetEntityQuery(NativeArray<ComponentType>)
    ComponentSystemBase.GetEntityQuery(EntityQueryDesc[])
    Namespace: Unity.Entities
    Syntax
    public abstract class SystemBase : ComponentSystemBase

    Properties

    Dependency

    Declaration
    protected JobHandle Dependency { get; set; }
    Property Value
    Type Description
    JobHandle

    Entities

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

    Declaration
    protected ForEachLambdaJobDescription Entities { get; }
    Property Value
    Type Description
    Unity.Entities.CodeGeneratedJobForEach.ForEachLambdaJobDescription

    Job

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

    Declaration
    protected LambdaSingleJobDescription Job { get; }
    Property Value
    Type Description
    Unity.Entities.CodeGeneratedJobForEach.LambdaSingleJobDescription

    Methods

    CompleteDependency()

    Declaration
    protected void CompleteDependency()

    OnUpdate()

    Implement OnUpdate to perform the major work of this system.

    Declaration
    protected abstract void OnUpdate()
    Remarks

    The system invokes OnUpdate once per frame on the main thread when any of this system's EntityQueries match existing entities, or if the system has the AlwaysUpdate attribute.

    Update()

    Declaration
    public override sealed void Update()
    Overrides
    ComponentSystemBase.Update()

    Extension Methods

    ComponentSystemBaseManagedComponentExtensions.HasSingleton<T>(ComponentSystemBase)
    ComponentSystemBaseManagedComponentExtensions.GetSingleton<T>(ComponentSystemBase)
    ComponentSystemBaseManagedComponentExtensions.SetSingleton<T>(ComponentSystemBase, T)
    JobForEachExtensions.GetEntityQueryForIJobForEach(ComponentSystemBase, Type)
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX