static object PerformMemberwiseClone(ref object o) { var ins = new UnityEngine.AI.NavMeshDataInstance(); ins = (UnityEngine.AI.NavMeshDataInstance)o; return(ins); }
static StackObject *RemoveNavMeshData_14(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.AI.NavMeshDataInstance handle = (UnityEngine.AI.NavMeshDataInstance) typeof(UnityEngine.AI.NavMeshDataInstance).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); UnityEngine.AI.NavMesh.RemoveNavMeshData(handle); return(__ret); }
/// <summary> /// Read the data using the reader. /// </summary> /// <param name="reader">Reader.</param> public override object Read(ISaveGameReader reader) { UnityEngine.AI.NavMeshDataInstance navMeshDataInstance = new UnityEngine.AI.NavMeshDataInstance(); foreach (string property in reader.Properties) { switch (property) { case "owner": Type ownerType = Type.GetType(reader.ReadProperty <System.String> ()); navMeshDataInstance.owner = (UnityEngine.Object)reader.ReadProperty(ownerType); break; } } return(navMeshDataInstance); }
static void WriteBackInstance(CSHotFix.Runtime.Enviorment.AppDomain __domain, StackObject *ptr_of_this_method, IList <object> __mStack, ref UnityEngine.AI.NavMeshDataInstance instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch (ptr_of_this_method->ObjectType) { case ObjectTypes.Object: { __mStack[ptr_of_this_method->Value] = instance_of_this_method; } break; case ObjectTypes.FieldReference: { var ___obj = __mStack[ptr_of_this_method->Value]; if (___obj is ILTypeInstance) { ((ILTypeInstance)___obj)[ptr_of_this_method->ValueLow] = instance_of_this_method; } else { var t = __domain.GetType(___obj.GetType()) as CLRType; t.SetFieldValue(ptr_of_this_method->ValueLow, ref ___obj, instance_of_this_method); } } break; case ObjectTypes.StaticFieldReference: { var t = __domain.GetType(ptr_of_this_method->Value); if (t is ILType) { ((ILType)t).StaticInstance[ptr_of_this_method->ValueLow] = instance_of_this_method; } else { ((CLRType)t).SetStaticFieldValue(ptr_of_this_method->ValueLow, instance_of_this_method); } } break; case ObjectTypes.ArrayReference: { var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as UnityEngine.AI.NavMeshDataInstance[]; instance_of_arrayReference[ptr_of_this_method->ValueLow] = instance_of_this_method; } break; } }
static int _m_AddNavMeshData_xlua_st_(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int __gen_param_count = LuaAPI.lua_gettop(L); try { if (__gen_param_count == 1 && translator.Assignable <UnityEngine.AI.NavMeshData>(L, 1)) { UnityEngine.AI.NavMeshData navMeshData = (UnityEngine.AI.NavMeshData)translator.GetObject(L, 1, typeof(UnityEngine.AI.NavMeshData)); UnityEngine.AI.NavMeshDataInstance __cl_gen_ret = UnityEngine.AI.NavMesh.AddNavMeshData(navMeshData); translator.Push(L, __cl_gen_ret); return(1); } if (__gen_param_count == 3 && translator.Assignable <UnityEngine.AI.NavMeshData>(L, 1) && translator.Assignable <UnityEngine.Vector3>(L, 2) && translator.Assignable <UnityEngine.Quaternion>(L, 3)) { UnityEngine.AI.NavMeshData navMeshData = (UnityEngine.AI.NavMeshData)translator.GetObject(L, 1, typeof(UnityEngine.AI.NavMeshData)); UnityEngine.Vector3 position; translator.Get(L, 2, out position); UnityEngine.Quaternion rotation; translator.Get(L, 3, out rotation); UnityEngine.AI.NavMeshDataInstance __cl_gen_ret = UnityEngine.AI.NavMesh.AddNavMeshData(navMeshData, position, rotation); translator.Push(L, __cl_gen_ret); return(1); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.AI.NavMesh.AddNavMeshData!")); }
/// <summary> /// Write the specified value using the writer. /// </summary> /// <param name="value">Value.</param> /// <param name="writer">Writer.</param> public override void Write(object value, ISaveGameWriter writer) { UnityEngine.AI.NavMeshDataInstance navMeshDataInstance = (UnityEngine.AI.NavMeshDataInstance)value; writer.WriteProperty("ownerType", navMeshDataInstance.owner.GetType().AssemblyQualifiedName); writer.WriteProperty("owner", navMeshDataInstance.owner); }