You can add StringTranslatable field and here is what you will see then:
public class DemoScript : MonoBehaviour
{
public StringTranslatable StringTranslatable;
}
I prefer add [BoxGroup] attribute to field. It will make your inspector better! (for a better understanding of how Odin Inspector works you can )
How can I use this StringTranslatable in my project???
-You can use it for keeping names and descriptions of any objects!
For example:
[CreateAssetMenu]
public class DemoScriptableObject : ScriptableObject
{
[BoxGroup("0", false)] public StringTranslatable Name;
[BoxGroup("1", false)] public StringTranslatable Description;
}
So here how it looks in Unity:
And then you can get a text as string this way:
public TMP_Text DescriptionText;
public DemoScriptableObject DemoScriptableObject;
public void Refresh()
{
DescriptionText.text = DemoScriptableObject.Description.Text;
}