GlobalConfigAttribute class

Namespace: Sirenix.Utilities
Assembly: Sirenix.Utilities
public class GlobalConfigAttribute : Attribute, _Attribute

This attribute is used by classes deriving from GlobalConfig and specifies the asset path for the generated config file.

  • System.Object
  • System.Attribute
  • GlobalConfigAttribute
See Also


Initializes a new instance of the GlobalConfigAttribute class.
public GlobalConfigAttribute()
Initializes a new instance of the GlobalConfigAttribute class.
public GlobalConfigAttribute(string assetPath)
System.String assetPath

The relative asset. Remember to locate the path within a resources folder if you want the config file to be loaded at runtime without the Unity Editor.


Gets the relative asset path. Only relevant if IsInResourcesFolder is false.
public string AssetPath { get; }
Gets a value indicating whether this asset is located within a resource folder.
public bool IsInResourcesFolder { get; }
Gets the resources path. Only relevant if IsInResourcesFolder is true.
public string ResourcesPath { get; }
Whether the config should be associated with an asset in the project. If false, no config asset will be generated or loaded, and a new "temporary" config instance will be created for every reload. This is true by default.
public bool UseAsset { get; set; }

This website is brand new and built with the Odin 2.1 beta in mind. This means you might discover some features such as attribute expressions that are only available in the beta.

You can download the 2.1 beta from here and read the patch-notes here.