Search Unity

Two-stick shooter ECS Pure tutorial error - Instancing is not supported

Discussion in 'Entity Component System' started by GerodruS, May 20, 2018.

  1. GerodruS

    GerodruS

    Joined:
    Aug 3, 2015
    Posts:
    7
    Tried to start Two-stick shooter ECS Pure tutorial project at my old macbook (2010, GeForce 330m) and got an error:

    InvalidOperationException: Instancing is not supported.
    UnityEngine.Graphics.DrawMeshInstanced (UnityEngine.Mesh mesh, System.Int32 submeshIndex, UnityEngine.Material material, UnityEngine.Matrix4x4[] matrices, System.Int32 count, UnityEngine.MaterialPropertyBlock properties, UnityEngine.Rendering.ShadowCastingMode castShadows, System.Boolean receiveShadows, System.Int32 layer, UnityEngine.Camera camera, UnityEngine.Rendering.LightProbeUsage lightProbeUsage, UnityEngine.LightProbeProxyVolume lightProbeProxyVolume) (at /Users/builduser/buildslave/unity/build/Runtime/Export/Graphics.bindings.cs:339)
    UnityEngine.Graphics.DrawMeshInstanced (UnityEngine.Mesh mesh, System.Int32 submeshIndex, UnityEngine.Material material, UnityEngine.Matrix4x4[] matrices, System.Int32 count, UnityEngine.MaterialPropertyBlock properties, UnityEngine.Rendering.ShadowCastingMode castShadows, System.Boolean receiveShadows) (at /Users/builduser/buildslave/unity/build/Runtime/Export/Graphics.bindings.cs:315)
    Unity.Rendering.MeshInstanceRendererSystem.OnUpdate () (at /Users/gerodrus/Library/Unity/cache/packages/staging-packages.unity.com/com.unity.entities@0.0.12-preview.1/Unity.Rendering.Hybrid/MeshInstanceRendererSystem.cs:77)
    Unity.Entities.ComponentSystem.InternalUpdate () (at /Users/gerodrus/Library/Unity/cache/packages/staging-packages.unity.com/com.unity.entities@0.0.12-preview.1/Unity.Entities/ComponentSystem.cs:247)
    Unity.Entities.ScriptBehaviourManager.Update () (at /Users/gerodrus/Library/Unity/cache/packages/staging-packages.unity.com/com.unity.entities@0.0.12-preview.1/Unity.Entities/ScriptBehaviourManager.cs:82)
    Unity.Entities.ScriptBehaviourUpdateOrder+DummyDelagateWrapper.TriggerUpdate () (at /Users/gerodrus/Library/Unity/cache/packages/staging-packages.unity.com/com.unity.entities@0.0.12-preview.1/Unity.Entities/ScriptBehaviourUpdateOrder.cs:59)


    Is there a way to run a sample at the configuration? Or the laptop stops to fit minimal system requirements?
     
  2. avvie

    avvie

    Joined:
    Jan 26, 2014
    Posts:
    74
    I think I had the same error last week (not entirely sure it was the same). You need to enable GPU instancing on the shader associated with your material
     
  3. GerodruS

    GerodruS

    Joined:
    Aug 3, 2015
    Posts:
    7
    If a material doesn't have "Enable GPU Instancing" flag, you will get another error:
    InvalidOperationException: Material needs to enable instancing for use with DrawMeshInstanced.