Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice

Question Is it slow to call c# script from uvs?

Discussion in 'Visual Scripting' started by chumomo, Oct 18, 2023.

  1. chumomo

    chumomo

    Joined:
    Jun 30, 2017
    Posts:
    17
    I use c# extensions by calling public static method from uvs, like
    public static float GetPositionX(this Transform target) => target.position.x;

    Definitly it's convenient than custom nodes, especially with 3rd party tools like DoTween.

    Are there any performance issues than custom nodes?

    Thanks!
     
  2. Trindenberg

    Trindenberg

    Joined:
    Dec 3, 2017
    Posts:
    396
    When I checked a year or so ago, they had a much higher latency than custom nodes (10x slower?) Static functions may be faster than class types though since less reflection is involved.