public override void Reset() { gameObject = null; quality = UnityEngine.AI.ObstacleAvoidanceType.NoObstacleAvoidance; orQualityFromString = null; orQualityFromInt = null; }
static int get_obstacleAvoidanceType(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.AI.NavMeshAgent obj = (UnityEngine.AI.NavMeshAgent)o; UnityEngine.AI.ObstacleAvoidanceType ret = obj.obstacleAvoidanceType; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index obstacleAvoidanceType on a nil value")); } }
static int set_obstacleAvoidanceType(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.AI.NavMeshAgent obj = (UnityEngine.AI.NavMeshAgent)o; UnityEngine.AI.ObstacleAvoidanceType arg0 = (UnityEngine.AI.ObstacleAvoidanceType)ToLua.CheckObject(L, 2, typeof(UnityEngine.AI.ObstacleAvoidanceType)); obj.obstacleAvoidanceType = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index obstacleAvoidanceType on a nil value")); } }
static StackObject *set_obstacleAvoidanceType_3(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 2); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.AI.ObstacleAvoidanceType @value = (UnityEngine.AI.ObstacleAvoidanceType) typeof(UnityEngine.AI.ObstacleAvoidanceType).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); UnityEngine.AI.NavMeshAgent instance_of_this_method = (UnityEngine.AI.NavMeshAgent) typeof(UnityEngine.AI.NavMeshAgent).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); instance_of_this_method.obstacleAvoidanceType = value; return(__ret); }
void DoSetObstacleAvoidanceType() { if (_agent == null) { return; } UnityEngine.AI.ObstacleAvoidanceType oat = quality; if (!orQualityFromInt.IsNone) { switch (orQualityFromInt.Value) { case 0: oat = UnityEngine.AI.ObstacleAvoidanceType.NoObstacleAvoidance; break; case 1: oat = UnityEngine.AI.ObstacleAvoidanceType.LowQualityObstacleAvoidance; break; case 2: oat = UnityEngine.AI.ObstacleAvoidanceType.MedQualityObstacleAvoidance; break; case 3: oat = UnityEngine.AI.ObstacleAvoidanceType.GoodQualityObstacleAvoidance; break; case 4: oat = UnityEngine.AI.ObstacleAvoidanceType.HighQualityObstacleAvoidance; break; } } else if (!orQualityFromString.IsNone) { switch (orQualityFromString.Value) { case "no": oat = UnityEngine.AI.ObstacleAvoidanceType.NoObstacleAvoidance; break; case "low": oat = UnityEngine.AI.ObstacleAvoidanceType.LowQualityObstacleAvoidance; break; case "medium": oat = UnityEngine.AI.ObstacleAvoidanceType.MedQualityObstacleAvoidance; break; case "good": oat = UnityEngine.AI.ObstacleAvoidanceType.GoodQualityObstacleAvoidance; break; case "high": oat = UnityEngine.AI.ObstacleAvoidanceType.HighQualityObstacleAvoidance; break; } } _agent.obstacleAvoidanceType = oat; }