---
tags:
    - "App, Game, Settings, Configuration"
---

# Memory Usage Changed

[Application](index.md) / **Memory Usage Changed**

## Description

Executes whenever the static Memory Usage Changed event of Application class is invoked

## Code

```cs
// <auto-generated>
// This script was automatically generated using the Visual Script Transpiler.
// Do not modify. Changes to this file will be lost when updating the package.
// </auto-generated>

using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Title("Memory Usage Changed")]
    [Category("Application/Memory Usage Changed")]
    [Description("Executes whenever the static Memory Usage Changed event of Application class is invoked")]
    
    [Image(typeof(IconCog), ColorTheme.Type.TextLight)]
    [Keywords("App, Game, Settings, Configuration")]
    
    [Serializable]
    public class GenTriggerApplication_MemoryUsageChanged : Trigger
    {
        
        protected override string GetTitle(GameObject source)
        {
            string className = TextUtils.ThemeAsKeyword("Application");
            string member = TextUtils.ThemeAsKeyword("Memory Usage Changed");
            return $"{className} {member}";
        }
        
        public override void OnDisable()
        {
            base.OnDisable();
            Application.memoryUsageChanged -= this.Run;
        }
        
        public override void OnEnable()
        {
            base.OnEnable();
            Application.memoryUsageChanged += this.Run;
        }
        
        private void Run(in ApplicationMemoryUsageChange value1)
        {
            using Args args = Args.Get(
                this.Component,
                this.Component
            );
            
            this.Run(args);
        }
    }
}


```

