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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Unity 3 beta - WrapperlessIcall

Discussion in 'Scripting' started by ockky, Aug 4, 2010.

  1. ockky

    ockky

    Joined:
    Dec 11, 2009
    Posts:
    18
    Pre-Unity3, a project i worked on had the Input class extended, however, after upgrading to the beta, i've noticed that Input is now sealed. I also couldn't help but notice that a 'WrapperlessIcall' attribute has been added to many of the methods within Input.

    So, i guess my question is, what is this WrapperlessIcall attribute?

    Thanks for any clarification
     
    marsonmao likes this.
  2. szi_John

    szi_John

    Joined:
    Feb 10, 2012
    Posts:
    70
  3. groscalin

    groscalin

    Joined:
    Apr 4, 2011
    Posts:
    6
    IMHO, it looks like unity's internal attribute that automates mono internal calls registration.
    means 'Wrapless Internal Call'
     
  4. marsonmao

    marsonmao

    Joined:
    Jan 20, 2015
    Posts:
    6
    anyone knows what WrapperlessIcall exactly does?
     
  5. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
  6. marsonmao

    marsonmao

    Joined:
    Jan 20, 2015
    Posts:
    6
    @Dantus Thanks for the link. But, sorry that I didn't make it clear enough.

    I mean, could someone please explain how does Unity use the class WrapperlessIcall in their codes?

    I know WrapperlessIcall usually shows up with with MethodImpl in Unity codes, and they're about calling internal native code, but what is the purpose of WrapperlessIcall, exactly?

    Like, Unity maybe use this attribute somewhere in their codes to distinguish the tagged methods, and maybe run automatic register process (mono_add_internal_call) for those tagged methods?
     
  7. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    If I remember correctly, they improved the managed to native call speed in Unity 3. It could be that they introduced a new attribute for that. But at the end it doesn't matter, because we can't use it anyways...
     
  8. marsonmao

    marsonmao

    Joined:
    Jan 20, 2015
    Posts:
    6
    @Dantus Ok, thanks. I guess I'm just curious about it.