static int _m_GetClosestReflectionProbes(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.Renderer gen_to_be_invoked = (UnityEngine.Renderer)translator.FastGetCSObj(L, 1); { System.Collections.Generic.List <UnityEngine.Rendering.ReflectionProbeBlendInfo> _result = (System.Collections.Generic.List <UnityEngine.Rendering.ReflectionProbeBlendInfo>)translator.GetObject(L, 2, typeof(System.Collections.Generic.List <UnityEngine.Rendering.ReflectionProbeBlendInfo>)); gen_to_be_invoked.GetClosestReflectionProbes(_result); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_GetPropertyBlock(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.Renderer __cl_gen_to_be_invoked = (UnityEngine.Renderer)translator.FastGetCSObj(L, 1); { UnityEngine.MaterialPropertyBlock dest = (UnityEngine.MaterialPropertyBlock)translator.GetObject(L, 2, typeof(UnityEngine.MaterialPropertyBlock)); __cl_gen_to_be_invoked.GetPropertyBlock(dest); return(0); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }
static int _m_GetSharedMaterials(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.Renderer gen_to_be_invoked = (UnityEngine.Renderer)translator.FastGetCSObj(L, 1); { System.Collections.Generic.List <UnityEngine.Material> _m = (System.Collections.Generic.List <UnityEngine.Material>)translator.GetObject(L, 2, typeof(System.Collections.Generic.List <UnityEngine.Material>)); gen_to_be_invoked.GetSharedMaterials(_m); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_GetInterpolatedProbe_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); { UnityEngine.Vector3 _position; translator.Get(L, 1, out _position); UnityEngine.Renderer _renderer = (UnityEngine.Renderer)translator.GetObject(L, 2, typeof(UnityEngine.Renderer)); UnityEngine.Rendering.SphericalHarmonicsL2 _probe; UnityEngine.LightProbes.GetInterpolatedProbe(_position, _renderer, out _probe); translator.Push(L, _probe); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
/// <summary> /// Constructor /// </summary> /// <param name="renderer">A renderer to arrange textures to</param> public TextureArranger(UnityEngine.Renderer renderer) { _renderer = renderer; }
static StackObject *GetInterpolatedProbe_0(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, 3); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); UnityEngine.Rendering.SphericalHarmonicsL2 probe = (UnityEngine.Rendering.SphericalHarmonicsL2) typeof(UnityEngine.Rendering.SphericalHarmonicsL2).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); UnityEngine.Renderer renderer = (UnityEngine.Renderer) typeof(UnityEngine.Renderer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 3); UnityEngine.Vector3 position = (UnityEngine.Vector3) typeof(UnityEngine.Vector3).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); UnityEngine.LightProbes.GetInterpolatedProbe(position, renderer, out probe); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); switch (ptr_of_this_method->ObjectType) { case ObjectTypes.StackObjectReference: { var ___dst = *(StackObject **)&ptr_of_this_method->Value; __mStack[___dst->Value] = probe; } break; case ObjectTypes.FieldReference: { var ___obj = __mStack[ptr_of_this_method->Value]; if (___obj is ILTypeInstance) { ((ILTypeInstance)___obj)[ptr_of_this_method->ValueLow] = probe; } else { var t = __domain.GetType(___obj.GetType()) as CLRType; t.SetFieldValue(ptr_of_this_method->ValueLow, ref ___obj, probe); } } 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] = probe; } else { ((CLRType)t).SetStaticFieldValue(ptr_of_this_method->ValueLow, probe); } } break; case ObjectTypes.ArrayReference: { var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as UnityEngine.Rendering.SphericalHarmonicsL2[]; instance_of_arrayReference[ptr_of_this_method->ValueLow] = probe; } break; } return(__ret); }
void Start() { _propBlock = new UnityEngine.MaterialPropertyBlock(); _renderer = GetComponent <UnityEngine.Renderer>(); }
static StackObject *GetInterpolatedProbe_0(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, 3); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.Rendering.SphericalHarmonicsL2 @probe = (UnityEngine.Rendering.SphericalHarmonicsL2) typeof(UnityEngine.Rendering.SphericalHarmonicsL2).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack)); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); UnityEngine.Renderer @renderer = (UnityEngine.Renderer) typeof(UnityEngine.Renderer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); ptr_of_this_method = ILIntepreter.Minus(__esp, 3); UnityEngine.Vector3 @position = (UnityEngine.Vector3) typeof(UnityEngine.Vector3).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); UnityEngine.LightProbes.GetInterpolatedProbe(@position, @renderer, out @probe); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); switch (ptr_of_this_method->ObjectType) { case ObjectTypes.StackObjectReference: { var ___dst = *(StackObject **)&ptr_of_this_method->Value; object ___obj = @probe; if (___dst->ObjectType >= ObjectTypes.Object) { if (___obj is CrossBindingAdaptorType) { ___obj = ((CrossBindingAdaptorType)___obj).ILInstance; } __mStack[___dst->Value] = ___obj; } else { ILIntepreter.UnboxObject(___dst, ___obj, __mStack, __domain); } } break; case ObjectTypes.FieldReference: { var ___obj = __mStack[ptr_of_this_method->Value]; if (___obj is ILTypeInstance) { ((ILTypeInstance)___obj)[ptr_of_this_method->ValueLow] = @probe; } else { var ___type = __domain.GetType(___obj.GetType()) as CLRType; ___type.SetFieldValue(ptr_of_this_method->ValueLow, ref ___obj, @probe); } } break; case ObjectTypes.StaticFieldReference: { var ___type = __domain.GetType(ptr_of_this_method->Value); if (___type is ILType) { ((ILType)___type).StaticInstance[ptr_of_this_method->ValueLow] = @probe; } else { ((CLRType)___type).SetStaticFieldValue(ptr_of_this_method->ValueLow, @probe); } } break; case ObjectTypes.ArrayReference: { var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as UnityEngine.Rendering.SphericalHarmonicsL2[]; instance_of_arrayReference[ptr_of_this_method->ValueLow] = @probe; } break; } __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 3); __intp.FreeStackValueType(ptr_of_this_method); __intp.Free(ptr_of_this_method); return(__ret); }