Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Earlybird · Apr 28, 2015 at 03:36 PM · animationanimatorerror messageanimator controlleruvanimation

UV scroll animation error

Any help with the following error:

The material property is different from already stored property.

I get it when animating the offset value (UV Scroll) in a material to simulate a wave animation

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Pharaoh_ · Apr 28, 2015 at 04:02 PM 0
Share

Are you using a shader?

avatar image Earlybird · Apr 29, 2015 at 08:05 AM 0
Share

Hi, Yes im using the following shader and animating it with the unity animator component.

 Shader "Dual Texture Blend"
 
 {
     Properties {
         _Color ("Color Tint (RGB)", Color) = (1,1,1,1)
         _$$anonymous$$ainTex ("Texture 01 (RGB)", 2D) = "white" {}
         _$$anonymous$$ainTex2 ("Texture 02 (RGB)", 2D) = "white" {}
         _$$anonymous$$askBlend ("$$anonymous$$ask Blend (L:Tex1 - R:Tex2)", Range (0, 1)) = 0.5
         _AlphaLevel ("Alpha Level", Range (0, 1)) = 0.5
     }
     
     SubShader {
         Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
         LOD 400
         
     CGPROGRA$$anonymous$$
     #pragma surface surf Lambert alpha
     
     sampler2D _$$anonymous$$ainTex, _$$anonymous$$ainTex2;
     fixed3 _Color;
     fixed _AlphaLevel, _$$anonymous$$askBlend;
     
     struct Input {
         fixed2 uv_$$anonymous$$ainTex;
         fixed2 uv_$$anonymous$$ainTex2;
     };
     
     void surf (Input IN, inout SurfaceOutput o) {
         fixed4 tex1 = tex2D(_$$anonymous$$ainTex, IN.uv_$$anonymous$$ainTex);
         fixed4 tex2 = tex2D(_$$anonymous$$ainTex2, IN.uv_$$anonymous$$ainTex2);
         fixed4 mix = lerp(tex1, tex2, _$$anonymous$$askBlend);
         o.Albedo = mix.rgb * _Color.rgb;
         o.Alpha = mix.a * _AlphaLevel;
     }
     ENDCG
     }
 
     FallBack "Transparent/Diffuse"
 }
avatar image Earlybird · May 08, 2015 at 09:55 AM 0
Share

any help on this?

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Arche-san · Jul 06, 2015 at 02:57 PM

Hey!

I've got the same error when manipulating material shader properties inside an animation.

Here's a step to reproduce it every time :

  • I can reproduce this issue only when unity editor is playing at the first time (after the error does not appear anymore).

  • The animation must modify at least 2 properties of the material shader.

  • The game object which contains the animation must be instantiated after the scene loading.

Here's the shader i'm using to reproduce the error (i'm not a shader expert so the script can contain some mistakes) :

 Shader "error/MaterialProperty"
 {
     Properties
     {
         [PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
         _Brightness("Brightness", Range (-2.0,2.0)) = 0
         _ColorAdd ("ColorAdd", Color) = (0,0,0,1)
         _ColorMult ("ColorMult", Color) = (1,1,1,1)
     }
 
     SubShader
     {
         Tags
         { 
             "Queue"="Transparent" 
             "IgnoreProjector"="True" 
             "RenderType"="Transparent" 
             "PreviewType"="Plane"
             "CanUseSpriteAtlas"="True"
         }
 
         Cull Off
         Lighting Off
         ZWrite Off
         Fog { Mode Off }
         Blend One OneMinusSrcAlpha 
 
         Pass
         {
         CGPROGRAM
             #pragma vertex vert
             #pragma fragment frag
             #include "UnityCG.cginc"
 
             struct appdata_t
             {
                 float4 vertex   : POSITION;
                 fixed4 color    : COLOR;
                 float2 texcoord : TEXCOORD0;
             };
 
             struct v2f
             {
                 float4 vertex   : SV_POSITION;
                 fixed4 color    : COLOR;
                 float2 texcoord  : TEXCOORD0;
             };
             
                fixed4 _ColorAdd;
             fixed4 _ColorMult;
             float _Brightness;
 
             v2f vert(appdata_t IN)
             {
                 v2f OUT;
                 OUT.vertex = mul(UNITY_MATRIX_MVP, IN.vertex);
                 OUT.texcoord = IN.texcoord;
                 OUT.color = IN.color;
 
                 return OUT;
             }
 
             sampler2D _MainTex;
 
             fixed4 frag(v2f IN) : SV_Target
             {
                 fixed4 c = tex2D(_MainTex, IN.texcoord);
                 c.rgb *= IN.color.rgb * IN.color.a * c.a;
                 c.a *= IN.color.a;
                 return c;
             }
         ENDCG
         }
     }
 }


Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

22 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Animation clip 'BackgroundAnim' is not retargetable? 0 Answers

Confused at triggering a simple animation 2 Answers

Animation Running Game 0 Answers

Animator doesnt work correctly after disabling then enabling a gameobject 1 Answer

Can't animate Sprite correctly 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges