Project Setting

A data model of project setting

Overview

As project dependency (package) is a separate project for any other projects to rely on, setting should be separated by each project.

Unity Editor's Project Setting window is a place to handle settings of all dependencies. However there is almost no package developer using it. It is quiet complicated to build up and Unity do not force developers to build settings in this way.


Package Info

display name

AceLand Project Settings

package name

latest version

1.0.0

namespace

dependencies


Build Level

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.

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;

Under Construction

Last updated