// 功能:根据脚本所传的参数,动态获取或创建一个关联的委托对象 public T GetDelegate <T>(long L, int nIndex = 0) where T : FCDelegateBase, new() { long nThisPtr = FCLibHelper.fc_get_inport_obj_ptr(L); // 得到脚本对象地址 long pDelegatePtr = FCLibHelper.fc_get_intptr(L, nIndex); // 得到脚本委托参数(临时的,不可保留) int nClassNameID = FCLibHelper.fc_inport_delegate_get_class_name_id(pDelegatePtr); // 类名 int nFuncNameID = FCLibHelper.fc_inport_delegate_get_func_name_id(pDelegatePtr); // 函数名 if (0 == nThisPtr && 0 == nClassNameID && 0 == nFuncNameID) { return(default(T)); // 返回空指针 } FCDelegateKey key = new FCDelegateKey(); key.nThisPtr = nThisPtr; key.nClassName = nClassNameID; key.nFuncName = nFuncNameID; FCDelegateBase obj = null; if (m_Delegates.TryGetValue(key, out obj)) { return((T)obj); } T pObj = new T(); pObj.m_nThisPtr = nThisPtr; pObj.m_szFuncName = GetDelegateFuncName(pDelegatePtr); pObj.m_nClassName = nClassNameID; pObj.m_nFuncName = nFuncNameID; m_Delegates[key] = pObj; return(pObj); }
public static int DestroyObject1_wrap(long L) { try { UnityObject arg0 = FCGetObj.GetObj <UnityObject>(FCLibHelper.fc_get_intptr(L, 0)); UnityObject.DestroyObject(arg0); } catch (Exception e) { Debug.LogException(e); } return(0); }
public static int DestroyImmediate_wrap(long L) { try { UnityObject arg0 = FCGetObj.GetObj <UnityObject>(FCLibHelper.fc_get_intptr(L, 0)); bool arg1 = FCLibHelper.fc_get_bool(L, 1); UnityObject.DestroyImmediate(arg0, arg1); } catch (Exception e) { Debug.LogException(e); } return(0); }
public static int set_font_wrap(long L) { try { long nThisPtr = FCLibHelper.fc_get_inport_obj_ptr(L); Text ret = get_obj(nThisPtr); UnityEngine.Font arg0 = FCGetObj.GetObj <UnityEngine.Font>(FCLibHelper.fc_get_intptr(L, 0)); ret.font = arg0; } catch (Exception e) { Debug.LogException(e); } return(0); }
public static int set_rootBone_wrap(long L) { try { long nThisPtr = FCLibHelper.fc_get_inport_obj_ptr(L); SkinnedMeshRenderer ret = get_obj(nThisPtr); UnityEngine.Transform arg0 = FCGetObj.GetObj <UnityEngine.Transform>(FCLibHelper.fc_get_intptr(L, 0)); ret.rootBone = arg0; } catch (Exception e) { Debug.LogException(e); } return(0); }
public static int UpdateExternalTexture_wrap(long L) { try { long nThisPtr = FCLibHelper.fc_get_inport_obj_ptr(L); Texture2D obj = get_obj(nThisPtr); System.IntPtr arg0 = FCGetObj.GetObj <System.IntPtr>(FCLibHelper.fc_get_intptr(L, 0)); obj.UpdateExternalTexture(arg0); } catch (Exception e) { Debug.LogException(e); } return(0); }
public static int BakeMesh_wrap(long L) { try { long nThisPtr = FCLibHelper.fc_get_inport_obj_ptr(L); SkinnedMeshRenderer obj = get_obj(nThisPtr); UnityEngine.Mesh arg0 = FCGetObj.GetObj <UnityEngine.Mesh>(FCLibHelper.fc_get_intptr(L, 0)); obj.BakeMesh(arg0); } catch (Exception e) { Debug.LogException(e); } return(0); }
public static int DontDestroyOnLoad_wrap(long L) { try { long nThisPtr = FCLibHelper.fc_get_inport_obj_ptr(L); UnityObject obj = get_obj(nThisPtr); UnityObject arg0 = FCGetObj.GetObj <UnityObject>(FCLibHelper.fc_get_intptr(L, 0)); UnityObject.DontDestroyOnLoad(arg0); } catch (Exception e) { Debug.LogException(e); } return(0); }
public static int set_sharedMaterial_wrap(long L) { try { long nThisPtr = FCLibHelper.fc_get_inport_obj_ptr(L); Renderer ret = get_obj(nThisPtr); UnityEngine.Material arg0 = FCGetObj.GetObj <UnityEngine.Material>(FCLibHelper.fc_get_intptr(L, 0)); ret.sharedMaterial = arg0; } catch (Exception e) { Debug.LogException(e); } return(0); }
public static int set_additionalVertexStreams_wrap(long L) { try { long nThisPtr = FCLibHelper.fc_get_inport_obj_ptr(L); MeshRenderer ret = get_obj(nThisPtr); UnityEngine.Mesh arg0 = FCGetObj.GetObj <UnityEngine.Mesh>(FCLibHelper.fc_get_intptr(L, 0)); ret.additionalVertexStreams = arg0; } catch (Exception e) { Debug.LogException(e); } return(0); }
public static int set_lightProbeProxyVolumeOverride_wrap(long L) { try { long nThisPtr = FCLibHelper.fc_get_inport_obj_ptr(L); Renderer ret = get_obj(nThisPtr); UnityEngine.GameObject arg0 = FCGetObj.GetObj <UnityEngine.GameObject>(FCLibHelper.fc_get_intptr(L, 0)); ret.lightProbeProxyVolumeOverride = arg0; } catch (Exception e) { Debug.LogException(e); } return(0); }
public static int set_cookie_wrap(long L) { try { long nThisPtr = FCLibHelper.fc_get_inport_obj_ptr(L); Light ret = get_obj(nThisPtr); UnityEngine.Texture arg0 = FCGetObj.GetObj <UnityEngine.Texture>(FCLibHelper.fc_get_intptr(L, 0)); ret.cookie = arg0; } catch (Exception e) { Debug.LogException(e); } return(0); }
public static int FindObjectsOfType_wrap(long L) { try { System.Type arg0 = FCGetObj.GetObj <System.Type>(FCLibHelper.fc_get_intptr(L, 0)); UnityObject[] ret = UnityObject.FindObjectsOfType(arg0); long ret_ptr = FCLibHelper.fc_get_return_ptr(L); FCCustomParam.ReturnArray(ret, ret_ptr); } catch (Exception e) { Debug.LogException(e); } return(0); }
public static int FindObjectOfType_wrap(long L) { try { System.Type arg0 = FCGetObj.GetObj <System.Type>(FCLibHelper.fc_get_intptr(L, 0)); UnityObject ret = UnityObject.FindObjectOfType(arg0); long ret_ptr = FCLibHelper.fc_get_return_ptr(L); long v = FCGetObj.PushObj(ret); FCLibHelper.fc_set_value_intptr(ret_ptr, v); } catch (Exception e) { Debug.LogException(e); } return(0); }
public static int LoadRawTextureData1_wrap(long L) { try { long nThisPtr = FCLibHelper.fc_get_inport_obj_ptr(L); Texture2D obj = get_obj(nThisPtr); System.IntPtr arg0 = FCGetObj.GetObj <System.IntPtr>(FCLibHelper.fc_get_intptr(L, 0)); int arg1 = FCLibHelper.fc_get_int(L, 1); obj.LoadRawTextureData(arg0, arg1); } catch (Exception e) { Debug.LogException(e); } return(0); }
public static int Instantiate2_wrap(long L) { try { UnityObject arg0 = FCGetObj.GetObj <UnityObject>(FCLibHelper.fc_get_intptr(L, 0)); UnityObject ret = UnityObject.Instantiate(arg0); long ret_ptr = FCLibHelper.fc_get_return_ptr(L); long v = FCGetObj.PushObj(ret); FCLibHelper.fc_set_value_intptr(ret_ptr, v); } catch (Exception e) { Debug.LogException(e); } return(0); }
public static int GetComponents_wrap(long L) { try { long nThisPtr = FCLibHelper.fc_get_inport_obj_ptr(L); Component obj = get_obj(nThisPtr); System.Type arg0 = FCGetObj.GetObj <System.Type>(FCLibHelper.fc_get_intptr(L, 0)); Component[] ret = obj.GetComponents(arg0); FCCustomParam.ReturnArray(ret, L); } catch (Exception e) { Debug.LogException(e); } return(0); }
public static int BroadcastMessage1_wrap(long L) { try { long nThisPtr = FCLibHelper.fc_get_inport_obj_ptr(L); Component obj = get_obj(nThisPtr); string arg0 = FCLibHelper.fc_get_string_a(L, 0); System.Object arg1 = FCGetObj.GetObj <System.Object>(FCLibHelper.fc_get_intptr(L, 1)); obj.BroadcastMessage(arg0, arg1); } catch (Exception e) { Debug.LogException(e); } return(0); }
public static int SendMessageUpwards1_wrap(long L) { try { long nThisPtr = FCLibHelper.fc_get_inport_obj_ptr(L); GameObject obj = get_obj(nThisPtr); string arg0 = FCLibHelper.fc_get_string_a(L, 0); System.Object arg1 = FCGetObj.GetObj <System.Object>(FCLibHelper.fc_get_intptr(L, 1)); obj.SendMessageUpwards(arg0, arg1); } catch (Exception e) { Debug.LogException(e); } return(0); }
public static int TestFunc1_wrap(long L) { try { int arg0 = FCLibHelper.fc_get_int(L, 0); string arg1 = FCLibHelper.fc_get_string_a(L, 1); Vector3 arg2 = new Vector3(); FCLibHelper.fc_get_vector3(L, 2, ref arg2); UnityEngine.Transform arg3 = FCGetObj.GetObj <UnityEngine.Transform>(FCLibHelper.fc_get_intptr(L, 3)); UserClass.TestFunc1(arg0, arg1, arg2, arg3); } catch (Exception e) { Debug.LogException(e); } return(0); }
public static int SendMessage_wrap(long L) { try { long nThisPtr = FCLibHelper.fc_get_inport_obj_ptr(L); Component obj = get_obj(nThisPtr); string arg0 = FCLibHelper.fc_get_string_a(L, 0); System.Object arg1 = FCGetObj.GetObj <System.Object>(FCLibHelper.fc_get_intptr(L, 1)); UnityEngine.SendMessageOptions arg2 = (UnityEngine.SendMessageOptions)(FCLibHelper.fc_get_int(L, 2)); obj.SendMessage(arg0, arg1, arg2); } catch (Exception e) { Debug.LogException(e); } return(0); }
public static int GetComponents1_wrap(long L) { try { long nThisPtr = FCLibHelper.fc_get_inport_obj_ptr(L); Component obj = get_obj(nThisPtr); System.Type arg0 = FCGetObj.GetObj <System.Type>(FCLibHelper.fc_get_intptr(L, 0)); List <UnityEngine.Component> arg1 = null; arg1 = FCCustomParam.GetList(ref arg1, L, 1); obj.GetComponents(arg0, arg1); } catch (Exception e) { Debug.LogException(e); } return(0); }
public static int Equals_wrap(long L) { try { long nThisPtr = FCLibHelper.fc_get_inport_obj_ptr(L); UnityObject obj = get_obj(nThisPtr); System.Object arg0 = FCGetObj.GetObj <System.Object>(FCLibHelper.fc_get_intptr(L, 0)); bool ret = obj.Equals(arg0); long ret_ptr = FCLibHelper.fc_get_return_ptr(L); FCLibHelper.fc_set_value_bool(ret_ptr, ret); } catch (Exception e) { Debug.LogException(e); } return(0); }
public static int GetComponentInParent_wrap(long L) { try { long nThisPtr = FCLibHelper.fc_get_inport_obj_ptr(L); Component obj = get_obj(nThisPtr); System.Type arg0 = FCGetObj.GetObj <System.Type>(FCLibHelper.fc_get_intptr(L, 0)); Component ret = obj.GetComponentInParent(arg0); long ret_ptr = FCLibHelper.fc_get_return_ptr(L); long v = FCGetObj.PushObj(ret); FCLibHelper.fc_set_value_intptr(ret_ptr, v); } catch (Exception e) { Debug.LogException(e); } return(0); }
public static int GetComponentsInParent1_wrap(long L) { try { long nThisPtr = FCLibHelper.fc_get_inport_obj_ptr(L); GameObject obj = get_obj(nThisPtr); System.Type arg0 = FCGetObj.GetObj <System.Type>(FCLibHelper.fc_get_intptr(L, 0)); bool arg1 = FCLibHelper.fc_get_bool(L, 1); Component[] ret = obj.GetComponentsInParent(arg0, arg1); long ret_ptr = FCLibHelper.fc_get_return_ptr(L); FCCustomParam.ReturnArray(ret, ret_ptr); } catch (Exception e) { Debug.LogException(e); } return(0); }
public static int Instantiate4_wrap(long L) { try { UnityObject arg0 = FCGetObj.GetObj <UnityObject>(FCLibHelper.fc_get_intptr(L, 0)); UnityEngine.Transform arg1 = FCGetObj.GetObj <UnityEngine.Transform>(FCLibHelper.fc_get_intptr(L, 1)); bool arg2 = FCLibHelper.fc_get_bool(L, 2); UnityObject ret = UnityObject.Instantiate(arg0, arg1, arg2); long ret_ptr = FCLibHelper.fc_get_return_ptr(L); long v = FCGetObj.PushObj(ret); FCLibHelper.fc_set_value_intptr(ret_ptr, v); } catch (Exception e) { Debug.LogException(e); } return(0); }
public static int Instantiate3_wrap(long L) { try { long nThisPtr = FCLibHelper.fc_get_inport_obj_ptr(L); UnityObject obj = get_obj(nThisPtr); UnityObject arg0 = FCGetObj.GetObj <UnityObject>(FCLibHelper.fc_get_intptr(L, 0)); UnityEngine.Transform arg1 = FCGetObj.GetObj <UnityEngine.Transform>(FCLibHelper.fc_get_intptr(L, 1)); UnityObject ret = UnityObject.Instantiate(arg0, arg1); long ret_ptr = FCLibHelper.fc_get_return_ptr(L); long v = FCGetObj.PushObj(ret); FCLibHelper.fc_set_value_intptr(ret_ptr, v); } catch (Exception e) { Debug.LogException(e); } return(0); }
public static int Instantiate_wrap(long L) { try { UnityObject arg0 = FCGetObj.GetObj <UnityObject>(FCLibHelper.fc_get_intptr(L, 0)); Vector3 arg1 = new Vector3(); FCLibHelper.fc_get_vector3(L, 1, ref arg1); Quaternion arg2 = new Quaternion(); FCLibHelper.fc_get_quaternion(L, 2, ref arg2); UnityObject ret = UnityObject.Instantiate(arg0, arg1, arg2); long ret_ptr = FCLibHelper.fc_get_return_ptr(L); long v = FCGetObj.PushObj(ret); FCLibHelper.fc_set_value_intptr(ret_ptr, v); } catch (Exception e) { Debug.LogException(e); } return(0); }
public static int CreateExternalTexture_wrap(long L) { try { int arg0 = FCLibHelper.fc_get_int(L, 0); int arg1 = FCLibHelper.fc_get_int(L, 1); UnityEngine.TextureFormat arg2 = (UnityEngine.TextureFormat)(FCLibHelper.fc_get_int(L, 2)); bool arg3 = FCLibHelper.fc_get_bool(L, 3); bool arg4 = FCLibHelper.fc_get_bool(L, 4); System.IntPtr arg5 = FCGetObj.GetObj <System.IntPtr>(FCLibHelper.fc_get_intptr(L, 5)); Texture2D ret = Texture2D.CreateExternalTexture(arg0, arg1, arg2, arg3, arg4, arg5); long ret_ptr = FCLibHelper.fc_get_return_ptr(L); long v = FCGetObj.PushObj(ret); FCLibHelper.fc_set_value_intptr(ret_ptr, v); } catch (Exception e) { Debug.LogException(e); } return(0); }
public static int RemoveCommandBuffer_wrap(long L) { try { long nThisPtr = FCLibHelper.fc_get_inport_obj_ptr(L); Light obj = get_obj(nThisPtr); UnityEngine.Rendering.LightEvent arg0 = (UnityEngine.Rendering.LightEvent)(FCLibHelper.fc_get_int(L, 0)); UnityEngine.Rendering.CommandBuffer arg1 = FCGetObj.GetObj <UnityEngine.Rendering.CommandBuffer>(FCLibHelper.fc_get_intptr(L, 1)); obj.RemoveCommandBuffer(arg0, arg1); } catch (Exception e) { Debug.LogException(e); } return(0); }