Search Unity

Bug Formatted string in Log is only printed until FixedString when Burst compiled

Discussion in 'Entity Component System' started by vectorized-runner, Apr 7, 2021.

  1. vectorized-runner

    vectorized-runner

    Joined:
    Jan 22, 2018
    Posts:
    398
    Code (CSharp):
    1. using Unity.Collections;
    2. using Unity.Entities;
    3. using UnityEngine;
    4.  
    5. public class TestSystem : SystemBase
    6. {
    7.     protected override void OnUpdate()
    8.     {
    9.         var fixedString = new FixedString32("-----");
    10.        
    11.         Job.WithCode(() =>
    12.            {
    13.                 Debug.Log($"Log {fixedString} and then some!");
    14.            })
    15.            .Run();
    16.     }
    17. }
    18.  
    Screenshot_2.png