Search Unity

IL2CPP User Script Stripping

Discussion in 'Web' started by popMark, Dec 18, 2021.

  1. popMark

    popMark

    Joined:
    Apr 14, 2013
    Posts:
    114
    Hi,

    I'm targeting webgl and I want to reduce the builds start up time by reducing the amount of stuff webassembly has to do at the start.

    I've read that user scripts are never stripped, and I'm using a number of packages including cinemachine which I'm assuming count as user scripts.

    Some of the packages I'm only using a tiny bit of, I'm only using CinemachineVirtualCamera and CinemachineBrain from Cinemachine.

    Is there anything like the reverse of link.xml where I can specify a set of classes to not preserve?

    I guess it would be tricky to set up and still have to project compile, especially for 3rd party packages, but I also have my own packages with a similar situation where I can confidently say if a behaviour is not being used in scenes or referenced in code
     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,497
    I'm not sure if you're aware or not but there's a dedicated sub-forum for WebGL here.

    I can move your post there if you wish?
     
  3. popMark

    popMark

    Joined:
    Apr 14, 2013
    Posts:
    114
    @MelvMay Figured it was more a build process or il2cpp thing?, not specific to webgl
     
  4. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,497
    Might be, not sure. Can leave it here if you want though.
     
  5. popMark

    popMark

    Joined:
    Apr 14, 2013
    Posts:
    114
    You're right, WebGL might be a better place for it