Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Use random mesh

Discussion in 'Visual Effect Graph' started by Feefafoozle, Aug 14, 2023.

  1. Feefafoozle

    Feefafoozle

    Joined:
    Sep 13, 2018
    Posts:
    3
    I am trying to use a random mesh from a short selection as a mesh output.
    The current method with a switch node is not working.
    "Can not link a GPU operator to a system wide (CPU) input."

    Any ideas? I would rather not create another emitter for each type.

    Thanks!
     

    Attached Files:

  2. PaulDemeulenaere

    PaulDemeulenaere

    Unity Technologies

    Joined:
    Sep 29, 2016
    Posts:
    134
    Hello,
    The mesh slot on output is evaluated on CPU while your input graph is using a Random Per Particle which is only available on GPU. That's why this error is triggered.

    However, you can use the Mesh Count property and the Mesh Index attribute to dynamically choose on the GPU between four meshes.

    random_mesh_output.gif
     

    Attached Files:

    Qriva and DevDunk like this.
  3. Feefafoozle

    Feefafoozle

    Joined:
    Sep 13, 2018
    Posts:
    3
    Oh sick! Thanks very much!