UILabel.SetCurrentPercent C# (CSharp) Méthode

SetCurrentPercent() public méthode

Convenience function, in case you wanted to associate progress bar, slider or scroll bar's OnValueChanged function in inspector with a label.
public SetCurrentPercent ( ) : void
Résultat void
	public void SetCurrentPercent ()
	{
		if (UIProgressBar.current != null)
			text = Mathf.RoundToInt(UIProgressBar.current.value * 100f) + "%";
	}

Usage Example

    static int SetCurrentPercent(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 1);
        UILabel obj = (UILabel)LuaScriptMgr.GetUnityObjectSelf(L, 1, "UILabel");

        obj.SetCurrentPercent();
        return(0);
    }
All Usage Examples Of UILabel::SetCurrentPercent