docs.unity3d.com
    Show / Hide Table of Contents

    Class MetadataCollect

    Abstract class for creating a metadata collector type to populate the PackedMemorySnapshot.Metadata member. You can add multiple collectors, but it is recommended to add only one. A collector instance will auto-register during construction.

    Inheritance
    Object
    MetadataCollect
    Namespace: Unity.MemoryProfiler
    Syntax
    public abstract class MetadataCollect : IDisposable
    Remarks

    Creating a collector instance will override the default metadata collection functionality. If you want to keep the default metadata, go to the DefaultCollect method in the file com.unity.memoryprofiler\Runtime\MetadataInjector.cs and copy that code into your collector method. Removing a collector can be achieved by calling dispose on the collector instance you want to unregister.

    Constructors

    MetadataCollect()

    Declaration
    public MetadataCollect()

    Methods

    CollectMetadata(MetaData)

    The Memory Profiler will invoke this method during the capture process, to populate the metadata of the capture.

    Declaration
    public abstract void CollectMetadata(MetaData data)
    Parameters
    Type Name Description
    MetaData data

    The data payload that will get written to the snapshot file.

    Dispose()

    Declaration
    public void Dispose()
    Back to top
    Terms of use
    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