Skip to content
One Last Click Docs

Customization

The [ProjectSettings] attribute accepts optional parameters for controlling how your settings are stored and displayed in Unity.

[ProjectSettings(
fileName: "Example.asset",
fileDirectory: "OneLastClick",
settingsProviderName: "Example Settings",
settingsProviderDirectory: "OneLastClick/Gameplay"
)]
public class ExampleProjectSettings : ScriptableObject
{
}
Parameter Description
fileName Changes the name of the settings file stored in ProjectSettings.
fileDirectory Stores the settings file in a subdirectory within ProjectSettings.
settingsProviderName Changes the name displayed in the Project Settings window.
settingsProviderDirectory Places the settings page inside a nested Project Settings category.
editorOnly Prevents the settings from being included in runtime builds.

Use settingsProviderDirectory to organize settings into categories.

[ProjectSettings(
settingsProviderDirectory: "OneLastClick/Rendering",
settingsProviderName: "Lighting Settings"
)]
public class LightingProjectSettings : ScriptableObject
{
public Material DefaultMaterial;
}

This creates the following entry:

Project Settings → OneLastClick → Rendering → Lighting Settings

Use fileDirectory to organize the serialized settings files within the project’s ProjectSettings folder.

[ProjectSettings(
fileDirectory: "OneLastClick/Rendering",
fileName: "Lighting.asset"
)]
public class LightingProjectSettings : ScriptableObject
{
}

The settings are stored at:

ProjectSettings/
└── OneLastClick/
└── Rendering/
└── Lighting.asset

Set editorOnly to true when a setting is only required by editor tooling.

[ProjectSettings(editorOnly: true)]
public class BuildProjectSettings : ScriptableObject
{
public string BuildOutputDirectory;
public bool EnableDevelopmentBuild;
}

Editor-only settings remain available in Project Settings and through ProjectSettingsEditorDatabase, but are excluded from runtime builds.