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 are updating our Terms of Service for all Unity subscription plans, effective October 13, 2022, to create a more streamlined, user-friendly set of terms. Please review them here: unity.com/legal/terms-of-service.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

IL2CPP User Script Stripping

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

  1. popMark

    popMark

    Joined:
    Apr 14, 2013
    Posts:
    113
    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:
    7,940
    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:
    113
    @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:
    7,940
    Might be, not sure. Can leave it here if you want though.
     
  5. popMark

    popMark

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