docs.unity3d.com
    Show / Hide Table of Contents

    Get started

    To get started, you can either create your own assembly definition file, or modify the attached samples.

    Create your own assembly definition file

    Create an assembly definition file called LoggingApplicationExample.asmdef and add the following packages to it:

    • Unity.Logging
    • Unity.Burst
    • Unity.Collections

    Then, create a MonoBehaviour script called LoggingApplicationExample.cs with the following:

    using Unity.Logging;
    
    public class UserLogger: MonoBehaviour
    {
        void Awake()
        {
            Log.Info("Hello, {username}!", "World");
        }
    }
    

    Use the included sample

    The Logging package contains an example file and the corresponding asmdef file. Copy LoggingSample files into a new project and modify the sample to get started.

    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, September 13, 2023