예제 #1
0
            /// <summary>
            ///
            /// </summary>
            /// <param name="binaryReader"></param>
            public virtual void Deserialize(BinaryReader binaryReader)
            {
                m_flags              = (UnityEngine.Rendering.ShaderPropertyFlags)binaryReader.ReadUInt32();
                m_textureDimension   = (UnityEngine.Rendering.TextureDimension)binaryReader.ReadInt32();
                m_type               = (UnityEngine.Rendering.ShaderPropertyType)binaryReader.ReadInt32();
                m_description        = binaryReader.ReadString();
                m_name               = binaryReader.ReadString();
                m_textureDefaultName = binaryReader.ReadString();
                m_nameId             = binaryReader.ReadInt32();
                m_defaultFloatValue  = binaryReader.ReadSingle();

                m_attributes         = SerializerKun.DesirializeStrings(binaryReader);
                m_rangeLimits        = SerializerKun.DesirializeObject <Vector2Kun>(binaryReader);
                m_defaultVectorValue = SerializerKun.DesirializeObject <Vector4Kun>(binaryReader);
            }
예제 #2
0
 static int GetPropertyFlags(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         UnityEngine.Shader obj = (UnityEngine.Shader)ToLua.CheckObject(L, 1, typeof(UnityEngine.Shader));
         int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
         UnityEngine.Rendering.ShaderPropertyFlags o = obj.GetPropertyFlags(arg0);
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
예제 #3
0
            public virtual void Deserialize(BinaryReader binaryReader)
            {
#if UNITY_2019_1_OR_NEWER
                m_flags = (UnityEngine.Rendering.ShaderPropertyFlags)binaryReader.ReadInt32();
                m_type  = (UnityEngine.Rendering.ShaderPropertyType)binaryReader.ReadInt32();
#endif
                m_textureDimension = (UnityEngine.Rendering.TextureDimension)binaryReader.ReadInt32();
                m_dirty            = binaryReader.ReadBoolean();
                m_nameId           = binaryReader.ReadInt32();
                m_floatValue       = binaryReader.ReadSingle();
                m_displayName      = binaryReader.ReadString();
                m_name             = binaryReader.ReadString();
                m_colorValue       = SerializerKun.DesirializeObject <ColorKun>(binaryReader);
                m_textureValue     = SerializerKun.DesirializeObject <TextureKun>(binaryReader);
                m_rangeLimits      = SerializerKun.DesirializeObject <Vector2Kun>(binaryReader);
                m_scale            = SerializerKun.DesirializeObject <Vector2Kun>(binaryReader);
                m_offset           = SerializerKun.DesirializeObject <Vector2Kun>(binaryReader);
                m_vectorValue      = SerializerKun.DesirializeObject <Vector4Kun>(binaryReader);
            }