public ShaderPropertyRename(string reference, string name,
                             UnityEngine.Rendering.ShaderPropertyType getPropertyType, bool isEnumKeyword, bool isHidden, bool isToggle, List <string> keywordValues = null)
 {
     m_reference             = m_newReference = reference;
     m_name                  = m_newName = name;
     m_searchStringReference = GetSearchStringReference(reference);
     m_searchStringName      = GetSearchStringName(name);
     isHiddenProperty        = isHidden;
     propertyType            = getPropertyType;
     this.isEnumKeyword      = isEnumKeyword;
     this.isToggle           = isToggle;
     this.keywordValues      = keywordValues;
 }
Exemplo n.º 2
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);
            }
Exemplo n.º 3
0
 static int GetPropertyType(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.ShaderPropertyType o = obj.GetPropertyType(arg0);
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 4
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);
            }