Skip to content

Using FastScriptReload causes Burst Jobs not to be compiled #205

@julhe

Description

@julhe

I noticed that after we upgraded our project from Unity 2022.3. to Unity 6.4, our Burst jobs would stop being compiled as Burst Jobs and would use their managed fallback.

Apparently, FastScriptReload causes the (default) async burst compiler to soft-lock. This gets especially prominent, if Burst's Synchronous Compilation is active, which causes Unity to get stuck in an endless "Importing Assets" loop. This seems also to be easily reproducible with :

  1. Create a new Unity 6.4 Project
  2. Install FastScriptReload via Git/PackageManager
  3. Create a simple Burst Job and save the file to something like BurstTest.cs
using Unity.Burst;
using Unity.Jobs;
using UnityEngine;

public class BurstTest : MonoBehaviour
{

    void Start()
    {
        BurstTestJob job = new ()
        {
            a = 1,
            b = 2
        };
        job.Schedule().Complete();
    }
}

[BurstCompile(CompileSynchronously = true)]
public struct BurstTestJob : IJob{
    public float a, b;
    public void Execute()
    {
        a *= b;
    }
}
  1. Notice how Unity gets stuck importing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions