AceLand Unity Packages
  • Home
  • Getting Started
    • Installation
    • Project Settings
    • Architecture Graph
    • Development Level
  • Tutorial
    • Create Your Package
    • Create Project Settings
  • Packages
    • Library
      • Change Log
      • Editor Tools
      • Mono
        • Follow Object
        • Singleton
      • Attributes
        • Conditional Show
        • Inspector Button
        • ReadOnly Field
      • Build Leveling
      • CVS
      • DataTools
      • Disposable Object
      • Extensions
      • Json
      • Kalman Filter
      • Optional
      • Project Setting
      • Serialization Surrogate
      • Utils
    • Event Driven
      • Change Log
      • Event Bus
      • Signal
    • Input
      • Change Log
    • Memento Service
      • Change Log
    • Node Framework
      • Change Log
      • Mono Node
    • Node For Mono (dev)
    • Player Loop Hack
      • Change Log
    • Pool
      • Change Log
    • Security (dev)
    • States
      • Change Log
    • Task Utils
      • Change Log
    • WebRequest
      • Change Log
Powered by GitBook
On this page
  1. Packages
  2. Library

Build Leveling

public enum BuildLevel
{
    None,
    Editor,
    Development,
    Production,
}

Build Leveling is a enum that contains few levels of application states.

Some of our packages are using this leveling for setting which states to print logs or doing other stuffs.

Usage

public BuildLevel loggingLevel = BuildLevel.DevelopmentBuild;

// print log on Development and Production.
if (loggingLevel.isAcceptedLevel())
    Debug.Log("I can print log");

// print log on Editor and Development.
if (loggingLevel.isAcceptedLevelInvert())
    Debug.Log("I can print log");

// print log on Development.
if (loggingLevel.IsAcceptedLevelOnly())
    Debug.Log("I can print log");

// BuildLevel.None will always return false.

// get current level
var currentLevel = BuildLevelUtils.CurrentLevel;

Last updated 6 months ago