void OnDrawGizmos() { if (spline != null) { spline.gizmoDraw(); // debug aid to be able to see the path in the scene inspector } }
static int gizmoDraw(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 1) { LTSpline obj = (LTSpline)ToLua.CheckObject <LTSpline>(L, 1); obj.gizmoDraw(); return(0); } else if (count == 2) { LTSpline obj = (LTSpline)ToLua.CheckObject <LTSpline>(L, 1); float arg0 = (float)LuaDLL.luaL_checknumber(L, 2); obj.gizmoDraw(arg0); return(0); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: LTSpline.gizmoDraw")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
void OnDrawGizmos() { if (s != null) { s.gizmoDraw(); } }
void OnDrawGizmos() { if (cr != null) { cr.gizmoDraw(); } }
static public int gizmoDraw(IntPtr l) { try { #if DEBUG var method = System.Reflection.MethodBase.GetCurrentMethod(); string methodName = GetMethodName(method); #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.BeginSample(methodName); #else Profiler.BeginSample(methodName); #endif #endif LTSpline self = (LTSpline)checkSelf(l); System.Single a1; checkType(l, 2, out a1); self.gizmoDraw(a1); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } #if DEBUG finally { #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.EndSample(); #else Profiler.EndSample(); #endif } #endif }
private void OnDrawGizmos() { Gizmos.color = Color.red; if (visualizePath != null) { visualizePath.gizmoDraw(); } }
void OnDrawGizmos() { if (spline != null) { Gizmos.color = Color.red; spline.gizmoDraw(); // debug aid to be able to see the path in the scene inspector } Gizmos.DrawWireCube(Points.Last().position, Points.Last().localScale); }
public void OnDrawGizmos() { init(); if (pathType == LeanTweenPathType.bezier) { for (int i = 0; i < pts.Length - 3; i += 4) { if (pts[i + 1] && pts[i + 2] && pts[i + 3]) { Vector3 first = Vector3.zero; if (i > 3 && pts[i - 1]) { first = pts[i - 1].position; } else if (pts[i]) { first = pts[i].position; } Gizmos.color = Color.magenta; LeanTween.drawBezierPath(first, pts[i + 2].position, pts[i + 1].position, pts[i + 3].position, showArrows ? controlSize * 0.25f : 0.0f, transform); Gizmos.color = Color.white; Gizmos.DrawLine(first, pts[i + 2].position); Gizmos.DrawLine(pts[i + 1].position, pts[i + 3].position); } } for (int i = 0; i < pts.Length; i++) { int iMod = i % 4; bool isPoint = iMod == 0 || iMod == 3; if (pts[i]) { pts[i].localScale = isPoint ? Vector3.one * controlSize * 0.5f : new Vector3(1f, 1f, 0.5f) * controlSize * 0.5f; } } } else { for (i = 0; i < pts.Length; i++) { if (pts[i]) { pts[i].localScale = Vector3.one * controlSize * 0.25f; } } LTSpline s = new LTSpline(splineVector()); Gizmos.color = Color.magenta; s.gizmoDraw(); } }
void OnDrawGizmos() { // Debug.Log("drwaing"); if (cr != null) { OnEnable(); } Gizmos.color = Color.red; if (cr != null) { cr.gizmoDraw(); // To Visualize the path, use this method } }
static public int gizmoDraw(IntPtr l) { try { LTSpline self = (LTSpline)checkSelf(l); System.Single a1; checkType(l, 2, out a1); self.gizmoDraw(a1); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int gizmoDraw(IntPtr l) { try { LTSpline self = (LTSpline)checkSelf(l); System.Single a1; checkType(l, 2, out a1); self.gizmoDraw(a1); return(0); } catch (Exception e) { LuaDLL.luaL_error(l, e.ToString()); return(0); } }
//===================================================== void OnDrawGizmos() { if (IsFlyThruAvailable == true || _path == null || _path.Length <= 1) { return; } Gizmos.color = Color.grey; // Visualize the path / spline if (_spline != null) { _spline.gizmoDraw(); } }
static int gizmoDraw(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); LTSpline obj = (LTSpline)ToLua.CheckObject(L, 1, typeof(LTSpline)); float arg0 = (float)LuaDLL.luaL_checknumber(L, 2); obj.gizmoDraw(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
private void OnDrawGizmos() { if (ShowGizmos) { wayPoints = new Vector3[waypoint.childCount]; for (int i = 0; i < waypoint.childCount; i++) { wayPoints[i] = waypoint.GetChild(i).transform.position; } spline = new LTSpline(wayPoints); Gizmos.color = Color.blue; if (spline != null) { spline.gizmoDraw(); } } }
//===================================================== void OnDrawGizmos() { Gizmos.color = Color.grey; if (_path == null || _path.Length <= 0) { return; } // Visualize the path / spline switch (_type) { case ePlatformType.ON_PATH: for (var i = 0; i < _path.Length - 1; i++) { Gizmos.DrawLine(_path[i], _path[i + 1]); } break; case ePlatformType.ON_SPLINE: if (_spline != null) { _spline.gizmoDraw(); } break; } // Draw lines between door and referenced switches foreach (var s in _switches) { if (s != null) { Gizmos.DrawLine(_thisTransform.position, s.transform.position); } } }
public void OnDrawGizmos(){ init(); if(pathType==LeanTweenPathType.bezier){ for(int i = 0; i < pts.Length-3; i += 4){ if(pts[i+1] && pts[i+2] && pts[i+3]){ Vector3 first = i>3 ? pts[i-1].position : pts[i].position; Gizmos.color = Color.magenta; LeanTween.drawBezierPath(first, pts[i+2].position, pts[i+1].position, pts[i+3].position); Gizmos.color = Color.white; Gizmos.DrawLine(first,pts[i+2].position); Gizmos.DrawLine(pts[i+1].position,pts[i+3].position); } } for(int i = 0; i < pts.Length; i++){ int iMod = i%4; bool isPoint = iMod==0||iMod==3; if(pts[i]) pts[i].localScale = isPoint ? Vector3.one * controlSize * 0.5f : new Vector3(1f,1f,0.5f) * controlSize * 0.5f; } }else{ for(i=0;i<pts.Length;i++){ if(pts[i]){ pts[i].localScale = Vector3.one * controlSize * 0.25f; } } LTSpline s = new LTSpline( splineVector() ); Gizmos.color = Color.magenta; s.gizmoDraw(); } }
void OnDrawGizmos() { init(); if(pathType==LeanTweenPathType.bezier){ for(int i = 0; i < pts.Length-3; i += 4){ Vector3 first = i>3 ? pts[i-1].position : pts[i].position; Gizmos.color = curveColor; LeanTween.drawBezierPath(first, pts[i+2].position, pts[i+1].position, pts[i+3].position); Gizmos.color = lineColor; Gizmos.DrawLine(first,pts[i+2].position); Gizmos.DrawLine(pts[i+1].position,pts[i+3].position); } }else{ LTSpline s = new LTSpline( splineVector() ); Gizmos.color = curveColor; s.gizmoDraw(); } }