Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Help with MaterialPropertyBlock in Animation

Discussion in 'Animation' started by Blasawebo, Oct 3, 2015.

  1. Blasawebo

    Blasawebo

    Joined:
    Jan 2, 2015
    Posts:
    54
    I cannot modify Material property in the Animator, I get this error, none of the materials are modifiable in Animator, and in the pass I was able to, my version is 5.2.1 the last one


    NullReferenceException: Object reference not set to an instance of an object
    UnityEditorInternal.AnimationRecording.HasAnyRecordableModifications (UnityEngine.GameObject root, UnityEditor.UndoPropertyModification[] modifications) (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/AnimationRecording.cs:16)
    UnityEditorInternal.AnimationRecording.Process (UnityEditorInternal.AnimationWindowState state, UnityEditor.UndoPropertyModification[] modifications) (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/AnimationRecording.cs:49)
    UnityEditorInternal.AnimationWindowState.PostprocessAnimationRecordingModifications (UnityEditor.UndoPropertyModification[] modifications) (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/AnimationWindowState.cs:1255)
    UnityEditorInternal.MaterialAnimationUtility.ApplyMaterialModificationToAnimationRecording (UnityEditor.MaterialProperty materialProp, UnityEngine.Object target, Single value) (at C:/buildslave/unity/build/Editor/Mono/Animation/MaterialAnimationUtility.cs:34)
    UnityEditorInternal.MaterialAnimationUtility.ApplyMaterialModificationToAnimationRecording (UnityEditor.MaterialProperty materialProp, Int32 changedMask, UnityEngine.Renderer target, System.Object oldValue) (at C:/buildslave/unity/build/Editor/Mono/Animation/MaterialAnimationUtility.cs:93)
    UnityEditor.MaterialEditor+ForwardApplyMaterialModification.DidModifyAnimationModeMaterialProperty (UnityEditor.MaterialProperty property, Int32 changedMask, System.Object previousValue) (at C:/buildslave/unity/build/Editor/Mono/Inspector/MaterialEditor.cs:1083)
     
  2. Blasawebo

    Blasawebo

    Joined:
    Jan 2, 2015
    Posts:
    54
    Please help...
     
  3. densy07

    densy07

    Joined:
    Nov 27, 2013
    Posts:
    34
    5.2.2f1 has same error log
     
  4. mnemonic

    mnemonic

    Joined:
    Oct 10, 2013
    Posts:
    5
    Same problem here. Is this supposed to be fixed soon? or do I need to make my own animation system for materials ?
     
  5. KongstudiosKorea

    KongstudiosKorea

    Joined:
    Oct 30, 2015
    Posts:
    1
    Me too. Fix it plz.....
     
  6. starportx

    starportx

    Joined:
    Nov 26, 2014
    Posts:
    7
    yeah, another Bug of the Year
     
  7. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    Hi everyone - have you tried this:

    Add a cube.
    Add a material to cube.
    Select cube.
    Open animator.
    Add new clip.
    Add Meshrenderer.Material._Color property.
    Animate rgb values from *animator spinners*.
    Stop recording.
    Press play to play game.
     
  8. Askaliate

    Askaliate

    Joined:
    Oct 17, 2015
    Posts:
    1
    I am having the same issue - it is ridiculous. I can't record any animation.
     
  9. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637