GetBlendShapeWeight() private method

private GetBlendShapeWeight ( int index ) : float
index int
return float
 static public int GetBlendShapeWeight(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
         UnityEngine.SkinnedMeshRenderer self = (UnityEngine.SkinnedMeshRenderer)checkSelf(l);
         System.Int32 a1;
         checkType(l, 2, out a1);
         var ret = self.GetBlendShapeWeight(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     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
 }
Ejemplo n.º 2
0
 static public int GetBlendShapeWeight(IntPtr l)
 {
     try {
         UnityEngine.SkinnedMeshRenderer self = (UnityEngine.SkinnedMeshRenderer)checkSelf(l);
         System.Int32 a1;
         checkType(l, 2, out a1);
         var ret = self.GetBlendShapeWeight(a1);
         pushValue(l, ret);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static int QPYX_GetBlendShapeWeight_YXQP(IntPtr L_YXQP)
 {
     try
     {
         ToLua.CheckArgsCount(L_YXQP, 2);
         UnityEngine.SkinnedMeshRenderer QPYX_obj_YXQP = (UnityEngine.SkinnedMeshRenderer)ToLua.CheckObject <UnityEngine.SkinnedMeshRenderer>(L_YXQP, 1);
         int   QPYX_arg0_YXQP = (int)LuaDLL.luaL_checknumber(L_YXQP, 2);
         float QPYX_o_YXQP    = QPYX_obj_YXQP.GetBlendShapeWeight(QPYX_arg0_YXQP);
         LuaDLL.lua_pushnumber(L_YXQP, QPYX_o_YXQP);
         return(1);
     }
     catch (Exception e_YXQP)                {
         return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP));
     }
 }
Ejemplo n.º 4
0
 static int GetBlendShapeWeight(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         UnityEngine.SkinnedMeshRenderer obj = (UnityEngine.SkinnedMeshRenderer)ToLua.CheckObject <UnityEngine.SkinnedMeshRenderer>(L, 1);
         int   arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
         float o    = obj.GetBlendShapeWeight(arg0);
         LuaDLL.lua_pushnumber(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 public static int GetBlendShapeWeight_wrap(long L)
 {
     try
     {
         long nThisPtr = FCLibHelper.fc_get_inport_obj_ptr(L);
         UnityEngine.SkinnedMeshRenderer obj = get_obj(nThisPtr);
         int   arg0    = FCLibHelper.fc_get_int(L, 0);
         float ret     = obj.GetBlendShapeWeight(arg0);
         long  ret_ptr = FCLibHelper.fc_get_return_ptr(L);
         FCLibHelper.fc_set_value_float(ret_ptr, ret);
     }
     catch (Exception e)
     {
         Debug.LogException(e);
     }
     return(0);
 }
    static int GetBlendShapeWeight(IntPtr L)
    {
#if UNITY_EDITOR
        ToluaProfiler.AddCallRecord("UnityEngine.SkinnedMeshRenderer.GetBlendShapeWeight");
#endif
        try
        {
            ToLua.CheckArgsCount(L, 2);
            UnityEngine.SkinnedMeshRenderer obj = (UnityEngine.SkinnedMeshRenderer)ToLua.CheckObject <UnityEngine.SkinnedMeshRenderer>(L, 1);
            int   arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
            float o    = obj.GetBlendShapeWeight(arg0);
            LuaDLL.lua_pushnumber(L, o);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
        /// <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.SkinnedMeshRenderer skinnedMeshRenderer = (UnityEngine.SkinnedMeshRenderer)value;
            List <float> blendShapeWeights = new List <float> ();

            for (int i = 0; i < skinnedMeshRenderer.sharedMesh.blendShapeCount; i++)
            {
                blendShapeWeights.Add(skinnedMeshRenderer.GetBlendShapeWeight(i));
            }
            writer.WriteProperty("blendShapeWeights", blendShapeWeights);
            writer.WriteProperty("bones", skinnedMeshRenderer.bones);
            writer.WriteProperty("rootBone", skinnedMeshRenderer.rootBone);
            writer.WriteProperty("quality", skinnedMeshRenderer.quality);
            writer.WriteProperty("sharedMesh", skinnedMeshRenderer.sharedMesh);
            writer.WriteProperty("updateWhenOffscreen", skinnedMeshRenderer.updateWhenOffscreen);
            writer.WriteProperty("skinnedMotionVectors", skinnedMeshRenderer.skinnedMotionVectors);
            writer.WriteProperty("localBounds", skinnedMeshRenderer.localBounds);
            writer.WriteProperty("enabled", skinnedMeshRenderer.enabled);
            writer.WriteProperty("shadowCastingMode", skinnedMeshRenderer.shadowCastingMode);
            writer.WriteProperty("receiveShadows", skinnedMeshRenderer.receiveShadows);
            writer.WriteProperty("material", skinnedMeshRenderer.material);
            writer.WriteProperty("sharedMaterial", skinnedMeshRenderer.sharedMaterial);
            writer.WriteProperty("materials", skinnedMeshRenderer.materials);
            writer.WriteProperty("sharedMaterials", skinnedMeshRenderer.sharedMaterials);
            writer.WriteProperty("lightmapIndex", skinnedMeshRenderer.lightmapIndex);
            writer.WriteProperty("realtimeLightmapIndex", skinnedMeshRenderer.realtimeLightmapIndex);
            writer.WriteProperty("lightmapScaleOffset", skinnedMeshRenderer.lightmapScaleOffset);
            writer.WriteProperty("motionVectorGenerationMode", skinnedMeshRenderer.motionVectorGenerationMode);
            writer.WriteProperty("realtimeLightmapScaleOffset", skinnedMeshRenderer.realtimeLightmapScaleOffset);
            writer.WriteProperty("lightProbeUsage", skinnedMeshRenderer.lightProbeUsage);
            writer.WriteProperty("lightProbeProxyVolumeOverride", skinnedMeshRenderer.lightProbeProxyVolumeOverride);
            writer.WriteProperty("probeAnchor", skinnedMeshRenderer.probeAnchor);
            writer.WriteProperty("reflectionProbeUsage", skinnedMeshRenderer.reflectionProbeUsage);
            writer.WriteProperty("sortingLayerName", skinnedMeshRenderer.sortingLayerName);
            writer.WriteProperty("sortingLayerID", skinnedMeshRenderer.sortingLayerID);
            writer.WriteProperty("sortingOrder", skinnedMeshRenderer.sortingOrder);
            writer.WriteProperty("tag", skinnedMeshRenderer.tag);
            writer.WriteProperty("name", skinnedMeshRenderer.name);
            writer.WriteProperty("hideFlags", skinnedMeshRenderer.hideFlags);
        }