UILabel.GetCharacterIndexAtPosition C# (CSharp) Méthode

GetCharacterIndexAtPosition() public méthode

Return the index of the character at the specified world position.
public GetCharacterIndexAtPosition ( Vector3 worldPos ) : int
worldPos Vector3
Résultat int
	public int GetCharacterIndexAtPosition (Vector3 worldPos)
	{
		Vector2 localPos = cachedTransform.InverseTransformPoint(worldPos);
		return GetCharacterIndexAtPosition(localPos);
	}

Same methods

UILabel::GetCharacterIndexAtPosition ( Vector2 localPos ) : int

Usage Example

	static int GetCharacterIndexAtPosition(IntPtr L)
	{
		try
		{
			int count = LuaDLL.lua_gettop(L);

			if (count == 3 && TypeChecker.CheckTypes<UnityEngine.Vector2, bool>(L, 2))
			{
				UILabel obj = (UILabel)ToLua.CheckObject<UILabel>(L, 1);
				UnityEngine.Vector2 arg0 = ToLua.ToVector2(L, 2);
				bool arg1 = LuaDLL.lua_toboolean(L, 3);
				int o = obj.GetCharacterIndexAtPosition(arg0, arg1);
				LuaDLL.lua_pushinteger(L, o);
				return 1;
			}
			else if (count == 3 && TypeChecker.CheckTypes<UnityEngine.Vector3, bool>(L, 2))
			{
				UILabel obj = (UILabel)ToLua.CheckObject<UILabel>(L, 1);
				UnityEngine.Vector3 arg0 = ToLua.ToVector3(L, 2);
				bool arg1 = LuaDLL.lua_toboolean(L, 3);
				int o = obj.GetCharacterIndexAtPosition(arg0, arg1);
				LuaDLL.lua_pushinteger(L, o);
				return 1;
			}
			else
			{
				return LuaDLL.luaL_throw(L, "invalid arguments to method: UILabel.GetCharacterIndexAtPosition");
			}
		}
		catch (Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}
All Usage Examples Of UILabel::GetCharacterIndexAtPosition