本文整理匯總了C#中UnityEngine.Component.ToString方法的典型用法代碼示例。如果您正苦於以下問題:C# Component.ToString方法的具體用法?C# Component.ToString怎麽用?C# Component.ToString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類UnityEngine.Component
的用法示例。
在下文中一共展示了Component.ToString方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: LoadMethod
/// <summary>
/// Tries to find the proper MethodInfo object based on the GameObject and a method string.
/// </summary>
public void LoadMethod()
{
MethodInfo[] ListOFMethods = GetAssemblyMethodArray(ReceiveObject);
if (ListOFMethods == null)
return;
int objectCount = ListOFMethods.Length;
for (int i = 0; i < objectCount; ++i)
{
if (ListOFMethods[i].Name.Equals(ReceiveMethod) == true)
{
m_methodInfoComponent = ListOFMethods[i];
m_componentObject = GetAssemblyComponent(ReceiveObject, ReceiveMethod, null);
if(m_componentObject != null)
{
ReceiveComponent = m_componentObject.ToString();
break;
}
}
}
}