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’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

Scripting b16 Renderer.materials accessing error

Discussion in '5.4 Beta' started by thylaxene, Apr 28, 2016.

  1. thylaxene

    thylaxene

    Joined:
    Oct 10, 2005
    Posts:
    716
    Sorry if this is obviously something I've missed in the docs as I'm late to the 5.4 betas.

    By doing this:

    if (thisRenderer.materials.Length > 1)

    gets this error:

    m_GpuProgram
    UnityEngine.Renderer:get_materials()

    I'm trying to change the material settings on a loaded and instantiated assetbundle mesh.

    Obviously works fine in 5.3.4.

    Any insights would be helpful.

    Cheers.