Class KnotLocalization
Core static class that keeps references to project wide KnotProjectSettings and application wide IKnotManager
Inheritance
System.Object
KnotLocalization
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Knot.Localization
Assembly: Knot.Localization.dll
Syntax
public static class KnotLocalization
Properties
Manager
Declaration
public static IKnotManager Manager { get; }
Property Value
Type | Description |
---|---|
IKnotManager |
ProjectSettings
Declaration
public static KnotProjectSettings ProjectSettings { get; }
Property Value
Type | Description |
---|---|
KnotProjectSettings |
Methods
GetAsset(String)
A shortcut for GetAssetValue(String). Returns asset assigned to key
from Manager
Declaration
public static Object GetAsset(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key |
Returns
Type | Description |
---|---|
UnityEngine.Object |
GetText(String)
A shortcut for GetTextValue(String). Returns text assigned to key
from Manager
Declaration
public static string GetText(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key |
Returns
Type | Description |
---|---|
System.String |
RegisterAssetUpdatedCallback(String, Action<Object>)
Registers assetUpdated
callback that is invoked when asset with given key
has been updated
Declaration
public static void RegisterAssetUpdatedCallback(string key, Action<Object> assetUpdated)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | |
System.Action<UnityEngine.Object> | assetUpdated |
RegisterTextUpdatedCallback(String, Action<String>)
Registers textUpdated
callback that is invoked when text with given key
has been updated
Declaration
public static void RegisterTextUpdatedCallback(string key, Action<string> textUpdated)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | |
System.Action<System.String> | textUpdated |
UnRegisterAssetUpdatedCallback(String, Action<Object>)
Removes assetUpdated
callback for given key
Declaration
public static void UnRegisterAssetUpdatedCallback(string key, Action<Object> assetUpdated)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | |
System.Action<UnityEngine.Object> | assetUpdated |
UnRegisterTextUpdatedCallback(String, Action<String>)
Removes textUpdated
callback for given key
Declaration
public static void UnRegisterTextUpdatedCallback(string key, Action<string> textUpdated)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | |
System.Action<System.String> | textUpdated |