I have the following line in a GUI not attached to the object and in a script attached to the object. Except i’m specifying the GameObject in the GUI version.
renderer.material.mainTextureOffset ("_Mask", new Vector2(0, SHADEVALUE));
In the GUI where I tested it it works fine. When I attach it to an object i’m getting the following error…
“The member `UnityEngine.Material.mainTextureOffset’ cannot be used as method or deleg”
the shade value is controlled from a slider, and in the script I’m referencing the interface.
UserInterface userInterface = (UserInterface)GameObject.Find("FPSPlayer").GetComponent(typeof(UserInterface));
SHADEVALUE = userInterface.shadeValue;
renderer.material.mainTextureOffset ("_Mask", new Vector2(0, SHADEVALUE));
what is wrong and why am I getting this error? Thanks.