MissingReferenceException: The variable sampleMaterials of UIAssets doesn't exist anymore.

Avatar
  • updated
  • Fixed

When updating my project to Shapes 3.0.0 I get this exception on Play (as well as project load). It doesn't seem to affect anything from what I can tell however.

What I did was:

- removed my previous 'Shapes' version folder (2.3.1 iirc) (causing a lot of compile errors) 

- imported everything in Shapes 3.0.0 (except for samples)

Full call stack:

MissingReferenceException: The variable sampleMaterials of UIAssets doesn't exist anymore.
You probably need to reassign the sampleMaterials variable of the 'UIAssets' script in the inspector.
Shapes.ShapesImportState.MakeSureSampleMaterialsAreValid () (at Assets/Shapes/Scripts/Editor/Utils/ShapesImportState.cs:80)
Shapes.ShapesImportState.CheckRenderPipeline () (at Assets/Shapes/Scripts/Editor/Utils/ShapesImportState.cs:63)
UnityEditor.EditorApplication.Internal_CallDelayFunctions () (at <007193b7fa9c4ad1be5b26df6a654213>:0)

EDIT:

This doesn't happen when downloading Shapes from a fresh project

Reporting a bug? please specify Unity version:
2019.4.11f1
Reporting a bug? please specify Shapes version:
3.0.0
Reporting a bug? please specify Render Pipeline:
Pinned replies
Avatar
Freya Holmér
  • Answer
  • Fixed

this has now also been fixed in 3.0.1, so you don't have to include samples if you don't want to

Avatar
Freya Holmér
  • Planned

ah, as of 3.0.0 Shapes has a hard dependency on including the samples

does the importer give you the option to not include samples or did you delete/uncheck it manually?

regardless I should probably make the code not error out in case samples are missing!

Avatar
SharkWithLasers
Quote from Freya Holmér

ah, as of 3.0.0 Shapes has a hard dependency on including the samples

does the importer give you the option to not include samples or did you delete/uncheck it manually?

regardless I should probably make the code not error out in case samples are missing!

ahh, in the fresh project I included the samples and in the error one, I didn't include samples (unchecked them manually).

Just added them now and the error went away. Thanks!

Avatar
Freya Holmér
  • Answer
  • Fixed

this has now also been fixed in 3.0.1, so you don't have to include samples if you don't want to