// Use this for initialization void Start() { meshAnim = GetComponentInChildren<Animator>(); agent = GetComponent<NavMeshAgent>(); path = new NavMeshPath(); agent.SetPath(path); }
static public int SetPath(IntPtr l) { try { UnityEngine.NavMeshAgent self = (UnityEngine.NavMeshAgent)checkSelf(l); UnityEngine.NavMeshPath a1; checkType(l, 2, out a1); var ret = self.SetPath(a1); pushValue(l, true); pushValue(l, ret); return(2); } catch (Exception e) { return(error(l, e)); } }
static public int SetPath(IntPtr l) { try { UnityEngine.NavMeshAgent self = (UnityEngine.NavMeshAgent)checkSelf(l); UnityEngine.NavMeshPath a1; checkType(l, 2, out a1); var ret = self.SetPath(a1); pushValue(l, ret); return(1); } catch (Exception e) { LuaDLL.luaL_error(l, e.ToString()); return(0); } }
static int SetPath(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UnityEngine.NavMeshAgent obj = (UnityEngine.NavMeshAgent)ToLua.CheckObject(L, 1, typeof(UnityEngine.NavMeshAgent)); UnityEngine.NavMeshPath arg0 = (UnityEngine.NavMeshPath)ToLua.CheckObject(L, 2, typeof(UnityEngine.NavMeshPath)); bool o = obj.SetPath(arg0); LuaDLL.lua_pushboolean(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
// Use this for initialization void Start () { agent = GetComponent<NavMeshAgent>(); path = new NavMeshPath(); hitPoint = transform.position; agent.SetPath(path); }