/* * GetComponentsInParent<T>(bool includeInactive) */ public static bool Component_GetComponentsInParentT1__Boolean(JSVCall vc, int count) { help_getComponentGo(vc); GameObject_GetComponentsInParentT1__Boolean(vc, count); goFromComponent = null; return true; }
public static bool Object_op_Inequality__Object__Object(JSVCall vc, int argc) { object arg0 = JSMgr.datax.getObject((int)JSApi.GetType.Arg); object arg1 = JSMgr.datax.getObject((int)JSApi.GetType.Arg); JSApi.setBooleanS((int)JSApi.SetType.Rval, (System.Boolean)(arg0 != arg1)); return true; }
static void help_searchAndRetComs(JSVCall vc, JSComponent[] com, string typeString) { List<JSComponent> lst = new List<JSComponent>(); foreach (var c in com) { if (c.jsClassName == typeString || JSEngine.inst.IsInheritanceRel(typeString, c.jsClassName)) { lst.Add(c); } } for (int i = 0; i < lst.Count; i++) { int jsObjID = lst[i].GetJSObjID(true); JSApi.setObject((int)JSApi.SetType.SaveAndTempTrace, jsObjID); JSApi.moveSaveID2Arr(i); } JSApi.setArrayS((int)JSApi.SetType.Rval, lst.Count, true); // var arrVal = new JSApi.jsval[lst.Count]; // for (int i = 0; i < lst.Count; i++) // { // JSApi.JSh_SetJsvalObject(ref arrVal[i], lst[i].jsObj); // } // JSMgr.datax.setArray(JSDataExchangeMgr.eSetType.SetRval, arrVal); }
/* * GetComponentsInChildren<T>() */ public static bool Component_GetComponentsInChildrenT1(JSVCall vc, int count) { help_getComponentGo(vc); GameObject_GetComponentsInChildrenT1(vc, count); goFromComponent = null; return true; }
public static bool Vector3_ProjectOnPlane__Vector3__Vector3(JSVCall vc, int argc) { Vector3 a0 = JSApi.getVector3S((int)JSApi.GetType.Arg); Vector3 a1 = JSApi.getVector3S((int)JSApi.GetType.Arg); Vector3 ret = Vector3.ProjectOnPlane(a0, a1); JSApi.setVector3S((int)JSApi.SetType.Rval, ret); return true; }
public static bool Vector2_MoveTowards__Vector2__Vector2__Single(JSVCall vc, int argc) { UnityEngine.Vector2 arg0 = JSApi.getVector2S((int)JSApi.GetType.Arg); UnityEngine.Vector2 arg1 = JSApi.getVector2S((int)JSApi.GetType.Arg); System.Single arg2 = (System.Single)JSApi.getSingle((int)JSApi.GetType.Arg); JSApi.setVector2S((int)JSApi.SetType.Rval, UnityEngine.Vector2.MoveTowards(arg0, arg1, arg2)); return true; }
public static bool Vector3_Reflect__Vector3__Vector3(JSVCall vc, int argc) { Vector3 a0 = JSApi.getVector3S((int)JSApi.GetType.Arg); Vector3 a1 = JSApi.getVector3S((int)JSApi.GetType.Arg); Vector3 ret = Vector3.Reflect(a0, a1); JSApi.setVector3S((int)(int)JSApi.SetType.Rval, ret); return true; }
public static bool Vector3_Slerp__Vector3__Vector3__Single(JSVCall vc, int argc) { Vector3 a0 = JSApi.getVector3S((int)JSApi.GetType.Arg); Vector3 a1 = JSApi.getVector3S((int)JSApi.GetType.Arg); float a2 = JSApi.getSingle((int)JSApi.GetType.Arg); Vector3 ret = Vector3.Slerp(a0, a1, a2); JSApi.setVector3S((int)JSApi.SetType.Rval, ret); return true; }
public static bool Vector3_OrthoNormalize__Vector3__Vector3(JSVCall vc, int argc) { Vector3 a0 = JSApi.getVector3S((int)JSApi.GetType.ArgRef); Vector3 a1 = JSApi.getVector3S((int)JSApi.GetType.ArgRef); Vector3.OrthoNormalize(ref a0, ref a1); JSApi.setVector3S((int)JSApi.SetType.ArgRef, a0); JSApi.setVector3S((int)JSApi.SetType.ArgRef, a1); return true; }
public static bool Vector3_RotateTowards__Vector3__Vector3__Single__Single(JSVCall vc, int argc) { Vector3 a0 = JSApi.getVector3S((int)JSApi.GetType.Arg); Vector3 a1 = JSApi.getVector3S((int)JSApi.GetType.Arg); float a2 = JSApi.getSingle((int)JSApi.GetType.Arg); float a3 = JSApi.getSingle((int)(int)JSApi.GetType.Arg); Vector3 ret = Vector3.RotateTowards(a0, a1, a2, a3); JSApi.setVector3S((int)JSApi.SetType.Rval, ret); return true; }
static void help_getGoAndType(JSVCall vc) { go = goFromComponent; if (go == null) { go = (UnityEngine.GameObject)vc.csObj; } typeString = JSApi.getStringS((int)JSApi.GetType.Arg); type = JSDataExchangeMgr.GetTypeByName(typeString); }
static void help_retComArr(JSVCall vc, Component[] arrRet) { int Count = arrRet.Length; for (int i = 0; i < arrRet.Length; i++) { JSMgr.datax.setObject((int)JSApi.SetType.SaveAndTempTrace, arrRet[i]); JSApi.moveSaveID2Arr(i); } JSApi.setArrayS((int)JSApi.SetType.Rval, Count, true); }
static void help_searchAndRetCom(JSVCall vc, JSComponent[] jsComs, string typeString) { int id = 0; foreach (var jsCom in jsComs) { if (jsCom.jsClassName == typeString || JSEngine.inst.IsInheritanceRel(typeString, jsCom.jsClassName)) { id = jsCom.GetJSObjID(true); break; } } JSApi.setObject((int)JSApi.SetType.Rval, id); }
static bool Encoding_GetPreamble(JSVCall vc, int argc) { int len = argc; if (len == 0) { var arrRet = ((System.Text.Encoding)vc.csObj).GetPreamble(); for (int i = 0; arrRet != null && i < arrRet.Length; i++) { JSApi.setByte((int)JSApi.SetType.SaveAndTempTrace, arrRet[i]); JSApi.moveSaveID2Arr(i); } JSApi.setArrayS((int)JSApi.SetType.Rval, (arrRet != null ? arrRet.Length : 0), true); } return(true); }
////////////////////// PlayerPrefsException /////////////////////////////////////// // constructors static bool PlayerPrefsException_PlayerPrefsException1(JSVCall vc, int argc) { int _this = JSApi.getObject((int)JSApi.GetType.Arg); JSApi.attachFinalizerObject(_this); --argc; int len = argc; if (len == 1) { System.String arg0 = (System.String)JSApi.getStringS((int)JSApi.GetType.Arg); JSMgr.addJSCSRel(_this, new UnityEngine.PlayerPrefsException(arg0)); } return(true); }
static bool Font_GetOSInstalledFontNames(JSVCall vc, int argc) { int len = argc; if (len == 0) { var arrRet = UnityEngine.Font.GetOSInstalledFontNames(); for (int i = 0; arrRet != null && i < arrRet.Length; i++) { JSApi.setStringS((int)JSApi.SetType.SaveAndTempTrace, arrRet[i]); JSApi.moveSaveID2Arr(i); } JSApi.setArrayS((int)JSApi.SetType.Rval, (arrRet != null ? arrRet.Length : 0), true); } return(true); }
static bool Font_GetCharacterInfo__Char__CharacterInfo__Int32(JSVCall vc, int argc) { int len = argc; if (len == 3) { System.Char arg0 = (System.Char)JSApi.getChar((int)JSApi.GetType.Arg); int r_arg1 = JSApi.incArgIndex(); UnityEngine.CharacterInfo arg1; System.Int32 arg2 = (System.Int32)JSApi.getInt32((int)JSApi.GetType.Arg); JSApi.setBooleanS((int)JSApi.SetType.Rval, (System.Boolean)(((UnityEngine.Font)vc.csObj).GetCharacterInfo(arg0, out arg1, arg2))); JSApi.setArgIndex(r_arg1); JSMgr.datax.setObject((int)JSApi.SetType.ArgRef, arg1); } return(true); }
static bool NavMesh_FindClosestEdge__Vector3__NavMeshHit__Int32(JSVCall vc, int argc) { int len = argc; if (len == 3) { UnityEngine.Vector3 arg0 = (UnityEngine.Vector3)JSApi.getVector3S((int)JSApi.GetType.Arg); int r_arg1 = JSApi.incArgIndex(); UnityEngine.NavMeshHit arg1; System.Int32 arg2 = (System.Int32)JSApi.getInt32((int)JSApi.GetType.Arg); JSApi.setBooleanS((int)JSApi.SetType.Rval, (System.Boolean)(UnityEngine.NavMesh.FindClosestEdge(arg0, out arg1, arg2))); JSApi.setArgIndex(r_arg1); JSMgr.datax.setObject((int)JSApi.SetType.ArgRef, arg1); } return(true); }
static bool Texture2D_GetPixels32(JSVCall vc, int argc) { int len = argc; if (len == 0) { var arrRet = ((UnityEngine.Texture2D)vc.csObj).GetPixels32(); for (int i = 0; arrRet != null && i < arrRet.Length; i++) { JSMgr.datax.setObject((int)JSApi.SetType.SaveAndTempTrace, arrRet[i]); JSApi.moveSaveID2Arr(i); } JSApi.setArrayS((int)JSApi.SetType.Rval, (arrRet != null ? arrRet.Length : 0), true); } return(true); }
static bool Bounds_IntersectRay__Ray__Single(JSVCall vc, int argc) { int len = argc; if (len == 2) { UnityEngine.Ray arg0 = (UnityEngine.Ray)JSMgr.datax.getObject((int)JSApi.GetType.Arg); int r_arg1 = JSApi.incArgIndex(); System.Single arg1; UnityEngine.Bounds argThis = (UnityEngine.Bounds)vc.csObj; JSApi.setBooleanS((int)JSApi.SetType.Rval, (System.Boolean)(argThis.IntersectRay(arg0, out arg1))); JSMgr.changeJSObj(vc.jsObjID, argThis); JSApi.setArgIndex(r_arg1); JSApi.setSingle((int)JSApi.SetType.ArgRef, arg1); } return(true); }
static bool Encoding_GetEncodings(JSVCall vc, int argc) { int len = argc; if (len == 0) { var arrRet = System.Text.Encoding.GetEncodings(); for (int i = 0; arrRet != null && i < arrRet.Length; i++) { JSMgr.datax.setObject((int)JSApi.SetType.SaveAndTempTrace, arrRet[i]); JSApi.moveSaveID2Arr(i); } JSApi.setArrayS((int)JSApi.SetType.Rval, (arrRet != null ? arrRet.Length : 0), true); } return(true); }
static bool Random_Random2(JSVCall vc, int argc) { int _this = JSApi.getObject((int)JSApi.GetType.Arg); JSApi.attachFinalizerObject(_this); --argc; int len = argc; if (len == 1) { System.Int32 arg0 = (System.Int32)JSApi.getInt32((int)JSApi.GetType.Arg); JSMgr.addJSCSRel(_this, new System.Random(arg0)); } return(true); }
public static bool Vector3_OrthoNormalize__Vector3__Vector3(JSVCall vc, int argc) { int r_arg0 = JSApi.getArgIndex(); Vector3 a0 = JSApi.getVector3S((int)JSApi.GetType.ArgRef); int r_arg1 = JSApi.getArgIndex(); Vector3 a1 = JSApi.getVector3S((int)JSApi.GetType.ArgRef); Vector3.OrthoNormalize(ref a0, ref a1); JSApi.setArgIndex(r_arg0); JSApi.setVector3S((int)JSApi.SetType.ArgRef, a0); JSApi.setArgIndex(r_arg1); JSApi.setVector3S((int)JSApi.SetType.ArgRef, a1); return(true); }
static bool Event_Event2(JSVCall vc, int argc) { int _this = JSApi.getObject((int)JSApi.GetType.Arg); JSApi.attachFinalizerObject(_this); --argc; int len = argc; if (len == 1) { UnityEngine.Event arg0 = (UnityEngine.Event)JSMgr.datax.getObject((int)JSApi.GetType.Arg); JSMgr.addJSCSRel(_this, new UnityEngine.Event(arg0)); } return(true); }
static bool Graphics_DrawTexture__Rect__Texture__Int32__Int32__Int32__Int32(JSVCall vc, int argc) { int len = argc; if (len == 6) { UnityEngine.Rect arg0 = (UnityEngine.Rect)JSMgr.datax.getObject((int)JSApi.GetType.Arg); UnityEngine.Texture arg1 = (UnityEngine.Texture)JSMgr.datax.getObject((int)JSApi.GetType.Arg); System.Int32 arg2 = (System.Int32)JSApi.getInt32((int)JSApi.GetType.Arg); System.Int32 arg3 = (System.Int32)JSApi.getInt32((int)JSApi.GetType.Arg); System.Int32 arg4 = (System.Int32)JSApi.getInt32((int)JSApi.GetType.Arg); System.Int32 arg5 = (System.Int32)JSApi.getInt32((int)JSApi.GetType.Arg); UnityEngine.Graphics.DrawTexture(arg0, arg1, arg2, arg3, arg4, arg5); } return(true); }
static bool Graphics_DrawMesh__Mesh__Matrix4x4__Material__Int32__Camera__Int32(JSVCall vc, int argc) { int len = argc; if (len == 6) { UnityEngine.Mesh arg0 = (UnityEngine.Mesh)JSMgr.datax.getObject((int)JSApi.GetType.Arg); UnityEngine.Matrix4x4 arg1 = (UnityEngine.Matrix4x4)JSMgr.datax.getObject((int)JSApi.GetType.Arg); UnityEngine.Material arg2 = (UnityEngine.Material)JSMgr.datax.getObject((int)JSApi.GetType.Arg); System.Int32 arg3 = (System.Int32)JSApi.getInt32((int)JSApi.GetType.Arg); UnityEngine.Camera arg4 = (UnityEngine.Camera)JSMgr.datax.getObject((int)JSApi.GetType.Arg); System.Int32 arg5 = (System.Int32)JSApi.getInt32((int)JSApi.GetType.Arg); UnityEngine.Graphics.DrawMesh(arg0, arg1, arg2, arg3, arg4, arg5); } return(true); }
// properties static void Vector2_Item_Int32(JSVCall vc) { System.Int32 arg0 = (System.Int32)JSApi.getInt32((int)JSApi.GetType.Arg); if (vc.bGet) { UnityEngine.Vector2 _this = (UnityEngine.Vector2)vc.csObj; var result = _this[arg0]; JSApi.setSingle((int)JSApi.SetType.Rval, (System.Single)(result)); } else { System.Single arg1 = (System.Single)JSApi.getSingle((int)JSApi.GetType.Arg); UnityEngine.Vector2 _this = (UnityEngine.Vector2)vc.csObj; _this[arg0] = arg1; JSMgr.changeJSObj(vc.jsObjID, _this); } }
static bool DOVirtual_EasedValue__Single__Single__Single__Ease__Single__Single(JSVCall vc, int argc) { int len = argc; if (len == 6) { System.Single arg0 = (System.Single)JSApi.getSingle((int)JSApi.GetType.Arg); System.Single arg1 = (System.Single)JSApi.getSingle((int)JSApi.GetType.Arg); System.Single arg2 = (System.Single)JSApi.getSingle((int)JSApi.GetType.Arg); DG.Tweening.Ease arg3 = (DG.Tweening.Ease)JSApi.getEnum((int)JSApi.GetType.Arg); System.Single arg4 = (System.Single)JSApi.getSingle((int)JSApi.GetType.Arg); System.Single arg5 = (System.Single)JSApi.getSingle((int)JSApi.GetType.Arg); JSApi.setSingle((int)JSApi.SetType.Rval, (System.Single)(DG.Tweening.DOVirtual.EasedValue(arg0, arg1, arg2, arg3, arg4, arg5))); } return(true); }
static bool NavMeshAgent_SamplePathPosition__Int32__Single__NavMeshHit(JSVCall vc, int argc) { int len = argc; if (len == 3) { System.Int32 arg0 = (System.Int32)JSApi.getInt32((int)JSApi.GetType.Arg); System.Single arg1 = (System.Single)JSApi.getSingle((int)JSApi.GetType.Arg); int r_arg2 = JSApi.incArgIndex(); UnityEngine.NavMeshHit arg2; JSApi.setBooleanS((int)JSApi.SetType.Rval, (System.Boolean)(((UnityEngine.NavMeshAgent)vc.csObj).SamplePathPosition(arg0, arg1, out arg2))); JSApi.setArgIndex(r_arg2); JSMgr.datax.setObject((int)JSApi.SetType.ArgRef, arg2); } return(true); }
static bool MinMaxCurve_MinMaxCurve2(JSVCall vc, int argc) { int _this = JSApi.getObject((int)JSApi.GetType.Arg); JSApi.attachFinalizerObject(_this); --argc; int len = argc; if (len == 1) { System.Single arg0 = (System.Single)JSApi.getSingle((int)JSApi.GetType.Arg); JSMgr.addJSCSRel(_this, new UnityEngine.ParticleSystem.MinMaxCurve(arg0)); } return(true); }
static bool Math_DivRem__Int32__Int32__Int32(JSVCall vc, int argc) { int len = argc; if (len == 3) { System.Int32 arg0 = (System.Int32)JSApi.getInt32((int)JSApi.GetType.Arg); System.Int32 arg1 = (System.Int32)JSApi.getInt32((int)JSApi.GetType.Arg); int r_arg2 = JSApi.incArgIndex(); System.Int32 arg2; JSApi.setInt32((int)JSApi.SetType.Rval, (System.Int32)(System.Math.DivRem(arg0, arg1, out arg2))); JSApi.setArgIndex(r_arg2); JSApi.setInt32((int)JSApi.SetType.ArgRef, arg2); } return(true); }
static bool Hashtable_Hashtable5(JSVCall vc, int argc) { int _this = JSApi.getObject((int)JSApi.GetType.Arg); JSApi.attachFinalizerObject(_this); --argc; int len = argc; if (len == 1) { System.Collections.IDictionary arg0 = (System.Collections.IDictionary)JSMgr.datax.getObject((int)JSApi.GetType.Arg); JSMgr.addJSCSRel(_this, new System.Collections.Hashtable(arg0)); } return(true); }
////////////////////// ComputeBuffer /////////////////////////////////////// // constructors static bool ComputeBuffer_ComputeBuffer1(JSVCall vc, int argc) { int _this = JSApi.getObject((int)JSApi.GetType.Arg); JSApi.attachFinalizerObject(_this); --argc; int len = argc; if (len == 2) { System.Int32 arg0 = (System.Int32)JSApi.getInt32((int)JSApi.GetType.Arg); System.Int32 arg1 = (System.Int32)JSApi.getInt32((int)JSApi.GetType.Arg); JSMgr.addJSCSRel(_this, new UnityEngine.ComputeBuffer(arg0, arg1)); } return(true); }
static bool UnassignedReferenceException_UnassignedReferenceException3(JSVCall vc, int argc) { int _this = JSApi.getObject((int)JSApi.GetType.Arg); JSApi.attachFinalizerObject(_this); --argc; int len = argc; if (len == 2) { System.String arg0 = (System.String)JSApi.getStringS((int)JSApi.GetType.Arg); System.Exception arg1 = (System.Exception)JSMgr.datax.getObject((int)JSApi.GetType.Arg); JSMgr.addJSCSRel(_this, new UnityEngine.UnassignedReferenceException(arg0, arg1)); } return(true); }
static bool Mesh_GetTriangles__Int32(JSVCall vc, int argc) { int len = argc; if (len == 1) { System.Int32 arg0 = (System.Int32)JSApi.getInt32((int)JSApi.GetType.Arg); var arrRet = ((UnityEngine.Mesh)vc.csObj).GetTriangles(arg0); for (int i = 0; arrRet != null && i < arrRet.Length; i++) { JSApi.setInt32((int)JSApi.SetType.SaveAndTempTrace, arrRet[i]); JSApi.moveSaveID2Arr(i); } JSApi.setArrayS((int)JSApi.SetType.Rval, (arrRet != null ? arrRet.Length : 0), true); } return(true); }
static bool NavMesh_SamplePosition__Vector3__NavMeshHit__Single__Int32(JSVCall vc, int argc) { int len = argc; if (len == 4) { UnityEngine.Vector3 arg0 = (UnityEngine.Vector3)JSApi.getVector3S((int)JSApi.GetType.Arg); int r_arg1 = JSApi.incArgIndex(); UnityEngine.NavMeshHit arg1; System.Single arg2 = (System.Single)JSApi.getSingle((int)JSApi.GetType.Arg); System.Int32 arg3 = (System.Int32)JSApi.getInt32((int)JSApi.GetType.Arg); JSApi.setBooleanS((int)JSApi.SetType.Rval, (System.Boolean)(UnityEngine.NavMesh.SamplePosition(arg0, out arg1, arg2, arg3))); JSApi.setArgIndex(r_arg1); JSMgr.datax.setObject((int)JSApi.SetType.ArgRef, arg1); } return(true); }
static bool Rect_Rect3(JSVCall vc, int argc) { int _this = JSApi.getObject((int)JSApi.GetType.Arg); JSApi.attachFinalizerObject(_this); --argc; int len = argc; if (len == 2) { UnityEngine.Vector2 arg0 = (UnityEngine.Vector2)JSApi.getVector2S((int)JSApi.GetType.Arg); UnityEngine.Vector2 arg1 = (UnityEngine.Vector2)JSApi.getVector2S((int)JSApi.GetType.Arg); JSMgr.addJSCSRel(_this, new UnityEngine.Rect(arg0, arg1)); } return(true); }
static bool WeakReference_WeakReference2(JSVCall vc, int argc) { int _this = JSApi.getObject((int)JSApi.GetType.Arg); JSApi.attachFinalizerObject(_this); --argc; int len = argc; if (len == 2) { System.Object arg0 = (System.Object)JSMgr.datax.getWhatever((int)JSApi.GetType.Arg); System.Boolean arg1 = (System.Boolean)JSApi.getBooleanS((int)JSApi.GetType.Arg); JSMgr.addJSCSRel(_this, new System.WeakReference(arg0, arg1)); } return(true); }
static bool TweenParams_SetLoops__Int32__NullableT1_LoopType(JSVCall vc, int argc) { int len = argc; if (len == 1) { System.Int32 arg0 = (System.Int32)JSApi.getInt32((int)JSApi.GetType.Arg); JSMgr.datax.setObject((int)JSApi.SetType.Rval, ((DG.Tweening.TweenParams)vc.csObj).SetLoops(arg0)); } else if (len == 2) { System.Int32 arg0 = (System.Int32)JSApi.getInt32((int)JSApi.GetType.Arg); Nullable <DG.Tweening.LoopType> arg1 = (Nullable <DG.Tweening.LoopType>)JSMgr.datax.getObject((int)JSApi.GetType.Arg); JSMgr.datax.setObject((int)JSApi.SetType.Rval, ((DG.Tweening.TweenParams)vc.csObj).SetLoops(arg0, arg1)); } return(true); }
static bool TweenParams_SetUpdate__UpdateType__Boolean(JSVCall vc, int argc) { int len = argc; if (len == 1) { DG.Tweening.UpdateType arg0 = (DG.Tweening.UpdateType)JSApi.getEnum((int)JSApi.GetType.Arg); JSMgr.datax.setObject((int)JSApi.SetType.Rval, ((DG.Tweening.TweenParams)vc.csObj).SetUpdate(arg0)); } else if (len == 2) { DG.Tweening.UpdateType arg0 = (DG.Tweening.UpdateType)JSApi.getEnum((int)JSApi.GetType.Arg); System.Boolean arg1 = (System.Boolean)JSApi.getBooleanS((int)JSApi.GetType.Arg); JSMgr.datax.setObject((int)JSApi.SetType.Rval, ((DG.Tweening.TweenParams)vc.csObj).SetUpdate(arg0, arg1)); } return(true); }
static bool GradientColorKey_GradientColorKey2(JSVCall vc, int argc) { int _this = JSApi.getObject((int)JSApi.GetType.Arg); JSApi.attachFinalizerObject(_this); --argc; int len = argc; if (len == 2) { UnityEngine.Color arg0 = (UnityEngine.Color)JSMgr.datax.getObject((int)JSApi.GetType.Arg); System.Single arg1 = (System.Single)JSApi.getSingle((int)JSApi.GetType.Arg); JSMgr.addJSCSRel(_this, new UnityEngine.GradientColorKey(arg0, arg1)); } return(true); }
static bool Rigidbody_SweepTestAll__Vector3(JSVCall vc, int argc) { int len = argc; if (len == 1) { UnityEngine.Vector3 arg0 = (UnityEngine.Vector3)JSApi.getVector3S((int)JSApi.GetType.Arg); var arrRet = ((UnityEngine.Rigidbody)vc.csObj).SweepTestAll(arg0); for (int i = 0; arrRet != null && i < arrRet.Length; i++) { JSMgr.datax.setObject((int)JSApi.SetType.SaveAndTempTrace, arrRet[i]); JSApi.moveSaveID2Arr(i); } JSApi.setArrayS((int)JSApi.SetType.Rval, (arrRet != null ? arrRet.Length : 0), true); } return(true); }
static bool File_ReadAllLines__String(JSVCall vc, int argc) { int len = argc; if (len == 1) { System.String arg0 = (System.String)JSApi.getStringS((int)JSApi.GetType.Arg); var arrRet = System.IO.File.ReadAllLines(arg0); for (int i = 0; arrRet != null && i < arrRet.Length; i++) { JSApi.setStringS((int)JSApi.SetType.SaveAndTempTrace, arrRet[i]); JSApi.moveSaveID2Arr(i); } JSApi.setArrayS((int)JSApi.SetType.Rval, (arrRet != null ? arrRet.Length : 0), true); } return(true); }
public static bool Vector3_OrthoNormalize__Vector3__Vector3__Vector3(JSVCall vc, int argc) { int r_arg0 = JSApi.getArgIndex(); Vector3 a0 = JSApi.getVector3S((int)JSApi.GetType.ArgRef); int r_arg1 = JSApi.getArgIndex(); Vector3 a1 = JSApi.getVector3S((int)JSApi.GetType.ArgRef); int r_arg2 = JSApi.getArgIndex(); Vector3 a2 = JSApi.getVector3S((int)JSApi.GetType.ArgRef); Vector3.OrthoNormalize(ref a0, ref a1, ref a2); JSApi.setArgIndex(r_arg0); JSApi.setVector3S((int)JSApi.SetType.ArgRef, a0); JSApi.setArgIndex(r_arg1); JSApi.setVector3S((int)JSApi.SetType.ArgRef, a1); JSApi.setArgIndex(r_arg2); JSApi.setVector3S((int)JSApi.SetType.ArgRef, a2); return true; }
/* * GameObject.AddComponent<T>() */ public static bool GameObject_AddComponentT1(JSVCall vc, int count) { help_getGoAndType(vc); if (isCSMonoBehaviour(type)) { Component com = go.AddComponent(type); JSMgr.datax.setObject((int)JSApi.SetType.Rval, com); } else { JSComponent jsComp = go.AddComponent<JSComponent>(); jsComp.jsClassName = typeString; jsComp.initFail = false; jsComp.Awake(); //JSApi.JSh_SetRvalObject(vc.cx, vc.vp, jsComp.jsObj); JSApi.setObject((int)JSApi.SetType.Rval, jsComp.jsObjID); } return true; }
public static bool GameObject_GetComponentsT1(JSVCall vc, int count) { help_getGoAndType(vc); if (isCSMonoBehaviour(type)) { Component[] arrRet = go.GetComponents(type); help_retComArr(vc, arrRet); } else { JSComponent[] com = go.GetComponents<JSComponent>(); help_searchAndRetComs(vc, com, typeString); } return true; }
public static bool GameObject_GetComponentT1(JSVCall vc, int count) { help_getGoAndType(vc); if (isCSMonoBehaviour(type)) { Component com = go.GetComponent(type); JSMgr.datax.setObject((int)JSApi.SetType.Rval, com); } else { JSComponent[] com = go.GetComponents<JSComponent>(); help_searchAndRetCom(vc, com, typeString); } return true; }
public static bool Vector3_GetHashCode(JSVCall vc, int argc) { int hash = ((Vector3)vc.csObj).GetHashCode(); JSApi.setInt32((int)JSApi.SetType.Rval, hash); return true; }
/* * GameObject.AddComponent<T>() */ public static bool GameObject_AddComponentT1(JSVCall vc, int count) { help_getGoAndType(vc); if (isCSMonoBehaviour(type)) { Component com = go.AddComponent(type); JSMgr.datax.setObject((int)JSApi.SetType.Rval, com); } else { string jsComponentName = JSMgr.GetMonoBehaviourJSComponentName(typeString); Type jsComponentType = typeof(JSComponent); if (string.IsNullOrEmpty(jsComponentName)) { Debug.LogWarning(string.Format("\"{0}\" has no JSComponent_XX. Use JSComponent instead.", typeString)); } else { jsComponentType = JSDataExchangeMgr.GetTypeByName(jsComponentName, jsComponentType); } JSComponent jsComp = (JSComponent)go.AddComponent(jsComponentType); jsComp.jsClassName = typeString; jsComp.jsFail = false; jsComp.init(true); jsComp.callAwake(); // Òªµ÷Óà js µÄ Awake //JSApi.JSh_SetRvalObject(vc.cx, vc.vp, jsComp.jsObj); JSApi.setObject((int)JSApi.SetType.Rval, jsComp.GetJSObjID(false)); } return true; }
public static bool Vector3_SmoothDamp__Vector3__Vector3__Vector3__Single(JSVCall vc, int argc) { Vector3 a0 = JSApi.getVector3S((int)JSApi.GetType.Arg); Vector3 a1 = JSApi.getVector3S((int)JSApi.GetType.Arg); Vector3 a2 = JSApi.getVector3S((int)JSApi.GetType.ArgRef); float a3 = JSApi.getSingle((int)JSApi.GetType.Arg); Vector3 ret = Vector3.SmoothDamp(a0, a1, ref a2, a3); JSApi.setVector3S((int)JSApi.SetType.ArgRef, a2); JSApi.setVector3S((int)JSApi.SetType.Rval, ret); return true; }
static void help_getComponentGo(JSVCall vc) { goFromComponent = ((UnityEngine.Component)vc.csObj).gameObject; }
public static bool GameObject_GetComponentsInParentT1__Boolean(JSVCall vc, int count) { help_getGoAndType(vc); // TODO check // bool includeInactive = JSMgr.datax.getBoolean(JSDataExchangeMgr.eGetType.GetARGV); bool includeInactive = JSApi.getBooleanS((int)JSApi.GetType.Arg); if (isCSMonoBehaviour(type)) { Component[] arrRet = go.GetComponentsInParent(type, includeInactive); help_retComArr(vc, arrRet); } else { JSComponent[] com = go.GetComponentsInParent<JSComponent>(includeInactive); help_searchAndRetComs(vc, com, typeString); } return true; }
static void help_searchAndRetCom(JSVCall vc, JSComponent[] jsComs, string typeString) { int id = 0; foreach (var jsCom in jsComs) { if (jsCom.jsClassName == typeString) { id = jsCom.jsObjID; break; } } JSApi.setObject((int)JSApi.SetType.Rval, id); }