Version 2.1.0.0

GlobalConfigAttribute class

Namespace: Sirenix.Utilities
Assembly: Sirenix.Utilities
[AttributeUsage(AttributeTargets.Class)]
public class GlobalConfigAttribute : Attribute, _Attribute

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

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

Constructors

GlobalConfigAttribute()
Initializes a new instance of the GlobalConfigAttribute class.
public GlobalConfigAttribute()
GlobalConfigAttribute(String)
Initializes a new instance of the GlobalConfigAttribute class.
public GlobalConfigAttribute(string assetPath)
Parameters
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.

Properties

AssetPath
Gets the relative asset path. Only relevant if IsInResourcesFolder is false.
public string AssetPath { get; }
IsInResourcesFolder
Gets a value indicating whether this asset is located within a resource folder.
public bool IsInResourcesFolder { get; }
ResourcesPath
Gets the resources path. Only relevant if IsInResourcesFolder is true.
public string ResourcesPath { get; }
UseAsset
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.