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

Materials become inactive for a animated object in gameplay mode

Discussion in 'Animation' started by ayush2901, Dec 11, 2019.

  1. ayush2901

    ayush2901

    Joined:
    Dec 11, 2019
    Posts:
    5
    Hi there, I am currently working on a small project on unity, and I am constantly facing the same problem. I import any .fbx file (a 3d model with animation) in my project, add animation controller and materials to the model and it looks good, but as soon as I hit the gameplay mode, the model turns green, as if the materials went inactive. I have tried many different models and tried many ways to solve this but the problem persists. Can anyone please help me with what I can do to rectify this?
     
  2. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,491
    Materials don't have an active/inactive state.

    If materials are missing, the model will be bright magenta, but there's no general reason why anything would turn green.

    Perhaps you should post some screenshots.
     
  3. ayush2901

    ayush2901

    Joined:
    Dec 11, 2019
    Posts:
    5
  4. ayush2901

    ayush2901

    Joined:
    Dec 11, 2019
    Posts:
    5
  5. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,491
    Yeah, there's no common reason it should be doing anything like that. Maybe the animation is animating the material's color or something?

    Try to narrow down the cause. Remove the Animator Controller and see if it still happens. Remove the Animator. Remove other objects from the scene. Etc.
     
  6. ayush2901

    ayush2901

    Joined:
    Dec 11, 2019
    Posts:
    5
    On removing the Animator Controller the colours do not change. Moreover, I tried making a project with only one 3d model but the problem continues (only when I enter the play mode).
    Can this be a problem of the website I am using to download my models ( sketchfab.com for .fbx format files)?
     
    Last edited: Dec 11, 2019
  7. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,491
    If removing the Animator Controller fixes it, then the problem is obviously one of the animations in it. You can use the Animation window to see what each animation does.