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
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023