Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Building of Avatars with Mono on Linux #165

Open
SylanTroh opened this issue Feb 24, 2025 · 3 comments
Open

Allow Building of Avatars with Mono on Linux #165

SylanTroh opened this issue Feb 24, 2025 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@SylanTroh
Copy link

SylanTroh commented Feb 24, 2025

Is your feature request related to a problem?

Linux uses Mono for its Windows build support, rather than IL2CPP.

Image

So CheckIfIL2CPPIsInstalled() will always be false even if Windows build support is installed on Linux.

Describe your preferred solution

I managed to get avatar builds on Linux working with the following two changes:

  1. I changed my scripting backend to Mono in Project Settings > Player (I am unsure if this can be automated, but it would be nice)
  2. I changed the CheckIfIL2CPPIsInstalled function to also check for Mono
public static bool CheckIfBuildSupportIsInstalled()
{
    Debug.Log("Checking if IL2CPP or Mono is installed...");

    var playbackEndingDirectory = BuildPipeline.GetPlaybackEngineDirectory(EditorUserBuildSettings.activeBuildTarget, BuildOptions.None, false);
    bool isIL2CPPInstalled = !string.IsNullOrEmpty(playbackEndingDirectory) && Directory.Exists(Path.Combine(playbackEndingDirectory, "Variations", "il2cpp"));
    bool isMonoInstalled = !string.IsNullOrEmpty(playbackEndingDirectory) && Directory.Exists(Path.Combine(playbackEndingDirectory, "Variations", "mono"));

    bool isInstalled = isIL2CPPInstalled || isMonoInstalled;
    
    Debug.Log(isIL2CPPInstalled ? "IL2CPP is installed." : "IL2CPP is NOT installed.");
    Debug.Log(isMonoInstalled ? "Mono is installed." : "Mono is NOT installed.");
    return isInstalled;
}

Describe any considered alternatives

I am unsure what consequences doing the above are for Windows, so I can't comment on that.

In any case, I think I could live with changing the scripting backend manually, since that's a one time change. But the build scripts should definitely be changed to check for build support in general, rather than IL2CPP in particular.

Additional Context

No response

@SylanTroh SylanTroh added the enhancement New feature or request label Feb 24, 2025
@dooly123
Copy link
Collaborator

i am going to make it a fall-through system where if il2cpp is found it uses that else it uses mono. (i can always assume mono exists)

@dooly123
Copy link
Collaborator

Image ok this should solve it, will roll it for testing soon. however, will be a week realistically before its in use. (will be apart of the bundle format change)

@dooly123
Copy link
Collaborator

dooly123 commented Mar 7, 2025

this is now solved on lts, can you please double check that it works for me ty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants