}     //End of GetPath

    #endregion


    public static void CallFunction(List <GameObject> objs, string scriptName, string functionName, List <Object> parameters)
    {
        foreach (GameObject obj in objs)
        {
            MonoBehaviour c = (MonoBehaviour)obj.GetComponent(scriptName.ToString());
            //MethodInfo m = c.GetType().GetMethod(functionName);

            c.BroadcastMessage(functionName.ToString());

            //c.functionName() ;
        }
    }
Exemple #2
0
 public static void BroadcastMessage( MonoBehaviour sender, string methodName )
 {
     #if DEBUG
     Debug.Log(
         string.Format(
             @"{0}{1}.BroadcastMessage( ""{2}"" );",
             LiveConsoleLogAttribute.Get( LiveConsoleLogAttribute.Attribute.Message ),
             sender.gameObject.name,
             methodName
         ),
         sender
         );
     #endif
     sender.BroadcastMessage( methodName, SendMessageOptions.DontRequireReceiver );
 }
 private void Log(string status)
 {
     Debug.Log(status);
     parent.BroadcastMessage("OnUpdateStatus", status);
 }
Exemple #4
0
 private void OnTriggerEnter(Collider other)
 {
     m_target.BroadcastMessage("OnTriggerEnter", other);
 }