Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IEnumerator LoadClass(string scriptname)
- {
- string url = "http://www.mywebsite.com/mygame/assetbundles/assetbundle1.unity3d";
- WWW www = WWW.LoadFromCacheOrDownload(url, 1);
- Debug.Log("Done1");
- // Wait for download to complete
- yield return www;
- MonoScript AppLocation = Resources.Load("phone/applications/Apps/AppsScript", typeof(MonoScript)) as MonoScript;
- Debug.Log(AppLocation);
- var type = AppLocation.GetType();
- // Debug.Log(type.GetMethod("start"));
- if (type != null)
- { // I want all the declared methods from the specific class.
- System.Reflection.MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.DeclaredOnly);
- Debug.Log("METYH");
- Debug.Log(methods[4]);
- }
- var k = AppLocation.ToString();
- ConstructorInfo[] j = type.GetConstructors();
- Debug.Log(k);
- //type.GetMethods
- GameObject go = new GameObject();
- go.AddComponent(type);
- Debug.Log("Done0");
- // type.GetMethod("loadApp");
- //Phone myCommonClass = ScriptableObject.CreateInstance(type.GetClass()) as Phone;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement