Search Unity

Resolved How to use a "Data" output?

Discussion in 'Visual Scripting' started by Maskedchamo, Sep 26, 2021.

  1. Maskedchamo

    Maskedchamo

    Joined:
    Mar 12, 2018
    Posts:
    23
    Hi,

    How does one use the "data" outputs on some of the units? For example, how to use the collision data that's being output by On Collision Enter 2D? Or the "TileData" from the Get Tile Data unit?

    data1.png data2.png

    I know how to use them in c#, but I can't find any built-in unit able to deal with these outputs. Are these exposed in case one wants to create their own unit and use it as an input?

    Thanks.
     
  2. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,076
    UnityVS by default exposes only the most commonly used types to keep search times reasonable. You can try searching for more niche types in Project Settings/Visual Scripting in the Types list by adding a new item there and then regenerate nodes. If it's a public property or struct, UnityVS can access it via reflection.
     
    Maskedchamo likes this.
  3. Maskedchamo

    Maskedchamo

    Joined:
    Mar 12, 2018
    Posts:
    23
    Great! That worked. Thanks a bunch PanthenEye.