docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class EntitiesGraphicsSystem

    Renders all entities that contain both RenderMesh and LocalToWorld components.

    Inheritance
    object
    ComponentSystemBase
    SystemBase
    EntitiesGraphicsSystem
    Inherited Members
    SystemBase.CompleteDependency()
    SystemBase.Update()
    SystemBase.OnUpdate()
    SystemBase.HasBuffer<T>(Entity)
    SystemBase.GetComponentLookup<T>(bool)
    SystemBase.GetBufferLookup<T>(bool)
    SystemBase.GetEntityStorageInfoLookup()
    SystemBase.Dependency
    SystemBase.CheckedStateRef
    ComponentSystemBase.OnCreate()
    ComponentSystemBase.OnStartRunning()
    ComponentSystemBase.OnStopRunning()
    ComponentSystemBase.OnDestroy()
    ComponentSystemBase.ShouldRunSystem()
    ComponentSystemBase.GetComponentTypeHandle<T>(bool)
    ComponentSystemBase.GetDynamicComponentTypeHandle(ComponentType)
    ComponentSystemBase.GetBufferTypeHandle<T>(bool)
    ComponentSystemBase.GetSharedComponentTypeHandle<T>()
    ComponentSystemBase.GetDynamicSharedComponentTypeHandle(ComponentType)
    ComponentSystemBase.GetEntityTypeHandle()
    ComponentSystemBase.RequireForUpdate(EntityQuery)
    ComponentSystemBase.RequireAnyForUpdate(params EntityQuery[])
    ComponentSystemBase.RequireAnyForUpdate(NativeArray<EntityQuery>)
    ComponentSystemBase.RequireForUpdate<T>()
    ComponentSystemBase.GetEntityQuery(params ComponentType[])
    ComponentSystemBase.GetEntityQuery(NativeArray<ComponentType>)
    ComponentSystemBase.GetEntityQuery(params EntityQueryDesc[])
    ComponentSystemBase.GetEntityQuery(in EntityQueryBuilder)
    ComponentSystemBase.Enabled
    ComponentSystemBase.EntityQueries
    ComponentSystemBase.GlobalSystemVersion
    ComponentSystemBase.LastSystemVersion
    ComponentSystemBase.EntityManager
    ComponentSystemBase.World
    ComponentSystemBase.SystemHandle
    ComponentSystemBase.WorldUpdateAllocator
    Namespace: Unity.Rendering
    Assembly: Unity.Entities.Graphics.dll
    Syntax
    [WorldSystemFilter(WorldSystemFilterFlags.Default|WorldSystemFilterFlags.Editor, WorldSystemFilterFlags.Default)]
    [UpdateInGroup(typeof(PresentationSystemGroup))]
    [UpdateAfter(typeof(UpdatePresentationSystemGroup))]
    [BurstCompile]
    public class EntitiesGraphicsSystem : SystemBase

    Properties

    EntitiesGraphicsEnabled

    Toggles the activation of EntitiesGraphicsSystem.

    Declaration
    public static bool EntitiesGraphicsEnabled { get; }
    Property Value
    Type Description
    bool
    Remarks

    To disable this system, use the HYBRID_RENDERER_DISABLED define.

    MaxBytesPerBatch

    The maximum GPU buffer size (in bytes) that a batch can access.

    Declaration
    public static int MaxBytesPerBatch { get; }
    Property Value
    Type Description
    int

    Stats

    Declaration
    public EntitiesGraphicsStats Stats { get; }
    Property Value
    Type Description
    EntitiesGraphicsStats

    Methods

    GetMaterial(BatchMaterialID)

    Returns the Material that corresponds to the given registered material ID, or null if no such material exists.

    Declaration
    public Material GetMaterial(BatchMaterialID material)
    Parameters
    Type Name Description
    BatchMaterialID material

    A material ID received from RegisterMaterial(Material).

    Returns
    Type Description
    Material

    The Material object corresponding to the given material ID if the ID is valid, or null if it's not valid.

    GetMesh(BatchMeshID)

    Returns the Mesh that corresponds to the given registered mesh ID, or null if no such mesh exists.

    Declaration
    public Mesh GetMesh(BatchMeshID mesh)
    Parameters
    Type Name Description
    BatchMeshID mesh

    A mesh ID received from RegisterMesh(Mesh).

    Returns
    Type Description
    Mesh

    The Mesh object corresponding to the given mesh ID if the ID is valid, or null if it's not valid.

    PruneUploadBufferPool(int)

    Prune sparse uploader gpu buffer pool.

    Declaration
    public void PruneUploadBufferPool(int maxMemoryToRetainInUploadPoolBytes)
    Parameters
    Type Name Description
    int maxMemoryToRetainInUploadPoolBytes

    Maximum memory target to keep alive in upload buffer pool. Only buffers marked as free will be pruned, so the memory retained might be more than requested.

    RegisterMaterial(Material)

    Registers a material with the Entities Graphics System.

    Declaration
    public BatchMaterialID RegisterMaterial(Material material)
    Parameters
    Type Name Description
    Material material

    The material instance to register

    Returns
    Type Description
    BatchMaterialID

    Returns the batch material ID

    RegisterMaterialPropertyType(Type, string, short)

    Registers a material property type with the given name.

    Declaration
    public static void RegisterMaterialPropertyType(Type type, string propertyName, short overrideTypeSizeGPU = -1)
    Parameters
    Type Name Description
    Type type

    The type of material property to register.

    string propertyName

    The name of the property.

    short overrideTypeSizeGPU

    An optional size of the type on the GPU.

    RegisterMaterialPropertyType<T>(string, short)

    A templated version of the material type registration method.

    Declaration
    public static void RegisterMaterialPropertyType<T>(string propertyName, short overrideTypeSizeGPU = -1) where T : IComponentData
    Parameters
    Type Name Description
    string propertyName

    The name of the property.

    short overrideTypeSizeGPU

    An optional size of the type on the GPU.

    Type Parameters
    Name Description
    T

    The type of material property to register.

    RegisterMesh(Mesh)

    Registers a mesh with the Entities Graphics System.

    Declaration
    public BatchMeshID RegisterMesh(Mesh mesh)
    Parameters
    Type Name Description
    Mesh mesh

    Mesh instance to register

    Returns
    Type Description
    BatchMeshID

    Returns the batch mesh ID

    UnregisterMaterial(BatchMaterialID)

    Unregisters a material from the Entities Graphics System.

    Declaration
    public void UnregisterMaterial(BatchMaterialID material)
    Parameters
    Type Name Description
    BatchMaterialID material

    Material ID received from RegisterMaterial(Material)

    UnregisterMesh(BatchMeshID)

    Unregisters a mesh from the Entities Graphics System.

    Declaration
    public void UnregisterMesh(BatchMeshID mesh)
    Parameters
    Type Name Description
    BatchMeshID mesh

    A mesh ID received from RegisterMesh(Mesh).

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)