docs.unity3d.com
    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.HasBuffer<T>(Entity)
    SystemBase.GetComponentLookup<T>(Boolean)
    SystemBase.GetBufferLookup<T>(Boolean)
    SystemBase.GetEntityStorageInfoLookup()
    SystemBase.Dependency
    SystemBase.CheckedStateRef
    SystemBase.Entities
    SystemBase.Job
    ComponentSystemBase.OnStartRunning()
    ComponentSystemBase.OnStopRunning()
    ComponentSystemBase.ShouldRunSystem()
    ComponentSystemBase.GetComponentTypeHandle<T>(Boolean)
    ComponentSystemBase.GetDynamicComponentTypeHandle(ComponentType)
    ComponentSystemBase.GetBufferTypeHandle<T>(Boolean)
    ComponentSystemBase.GetSharedComponentTypeHandle<T>()
    ComponentSystemBase.GetDynamicSharedComponentTypeHandle(ComponentType)
    ComponentSystemBase.GetEntityTypeHandle()
    ComponentSystemBase.RequireForUpdate(EntityQuery)
    ComponentSystemBase.RequireAnyForUpdate(EntityQuery[])
    ComponentSystemBase.RequireAnyForUpdate(NativeArray<EntityQuery>)
    ComponentSystemBase.RequireForUpdate<T>()
    ComponentSystemBase.GetEntityQuery(ComponentType[])
    ComponentSystemBase.GetEntityQuery(NativeArray<ComponentType>)
    ComponentSystemBase.GetEntityQuery(EntityQueryDesc[])
    ComponentSystemBase.GetEntityQuery(EntityQueryBuilder)
    ComponentSystemBase.Enabled
    ComponentSystemBase.EntityQueries
    ComponentSystemBase.GlobalSystemVersion
    ComponentSystemBase.LastSystemVersion
    ComponentSystemBase.EntityManager
    ComponentSystemBase.World
    ComponentSystemBase.SystemHandle
    ComponentSystemBase.WorldUpdateAllocator
    Namespace: Unity.Rendering
    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
    Boolean
    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
    Int32

    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.

    OnCreate()

    Called when this system is created.

    Declaration
    protected override void OnCreate()
    Overrides
    ComponentSystemBase.OnCreate()

    OnDestroy()

    Called when this system is destroyed.

    Declaration
    protected override void OnDestroy()
    Overrides
    ComponentSystemBase.OnDestroy()

    OnUpdate()

    Called when this system is updated.

    Declaration
    protected override void OnUpdate()
    Overrides
    SystemBase.OnUpdate()

    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, Int16)

    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.

    Int16 overrideTypeSizeGPU

    An optional size of the type on the GPU.

    RegisterMaterialPropertyType<T>(String, Int16)

    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.

    Int16 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).

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023