0

I wanted to make a customization slider. This is my code:

public Slider sliderval;
public MeshRenderer _eyeRendererL;
public MeshRenderer _eyeRendererR;

// eye materials
public Material complicatedEye01Material;
 float valueSlider = sliderval.value;
    switch (valueSlider)
    {
        case 1:
            _eyeRendererL.material = complicatedEye01Material;
            _eyeRendererR.material = complicatedEye01Material;
            break;
        default:
            _eyeRendererL.material = complicatedEye01Material;
            _eyeRendererR.material = complicatedEye01Material;
            break;

Im using Unity-chan model btw

this is what I put in the inspector: [enter image description here][1] and this is the error I am having: [enter image description here][2]

I only have a year of unity experience and this customization isn't for anything professional which is why I'm yandere devving it. [1]: https://i.stack.imgur.com/7dhjB.png [2]: https://i.stack.imgur.com/t2xdj.png

Cai Chi
  • 11
  • 2
  • The error is quite clear. Whats the line 30 of `CustomCreator.cs` read? Something in that line is null. The code has no line numbers and you have deleted the `using` declarations so it's impossible for us to tell. – TEEBQNE Sep 23 '21 at 22:09

0 Answers0