|
[code=csharp]using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using System;
using UnityEngine;
public class MoveTest : MonoBehaviour
{
private Easer easer;
// Use this for initialization
void Start()
{
string str = "FFF";
Type type = Type.GetType (str);
MethodInfo meth = type.GetMethod ("pop");
var obj = type.Assembly.CreateInstance (str);
object[] param=new object[2]{1,2};
Vector3 ss=(Vector3)meth.Invoke (obj,param);
Debug.Log("ss:"+ss);
}
// Update is called once per frame
void Update()
{
}
}
public class FFF{
public void ttt(){
}
public Vector3 pop(float p1,float p2){
Debug.Log (777);
Debug.Log ("p1:"+p1);
Debug.Log ("p2:"+p2);
return new Vector3(0,0,0);
}
}[/code]
|
|