Author Topic: UIDrawCall throwing "Material doesn't have a float or range property '#####'"  (Read 5603 times)

jchowdown

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 16
    • View Profile
Hi Everyone, has anyone seen this problem before?

I'm instantiating a few UITextures from a prefab loaded from an asset bundle. The actual error is:
http://screencast.com/t/wu1akElCDUIV
It's causing our iOS build to go crazy.
(While the error appears in Editor, the game seems to recover from it and/or ignore it)

The line it's happening on is in UIDrawCall.cs:
http://screencast.com/t/C0H5MGxXo2Wr

_GradWidth, _GradOffset, and _GradPeak are the parameters used by the shader that's referenced by the material that's specified in the UITexture. The Unity forums indicate that this might be a syntax error on my shader but i've confirmed that this is not the case.

One clue is that if I move the prefab to a 'Resources' folder and load it via Resources.Load(), the problem does not happen. This leads me to believe that it might have to do with how Unity serializes dependences into asset bundles. We're using the flags

BuildAssetBundleOptions.CollectDependencies | BuildAssetBundleOptions.CompleteAssets

when we build our bundles.

Has anyone seen this before and knows what's going on?

Thanks,
Jeff