protected void ChangeElevatorTexture(Texture newTex) { meshRenderer.GetPropertyBlock(MatProp); MatProp.SetTexture("_MainTex", newTex); meshRenderer.SetPropertyBlock(MatProp); }
public void ChangeTex(Texture tex) { meshRenderer.GetPropertyBlock(MatProp); MatProp.SetTexture("_MainTex", tex); meshRenderer.SetPropertyBlock(MatProp); }
void ChangeTexture(int actualTimerValue) { switch (actualTimerValue) { case 9: _MainTex = _MaterialCentral.instance.actualPack._CounterTex9; break; case 8: _MainTex = _MaterialCentral.instance.actualPack._CounterTex8; break; case 7: _MainTex = _MaterialCentral.instance.actualPack._CounterTex7; break; case 6: _MainTex = _MaterialCentral.instance.actualPack._CounterTex6; break; case 5: _MainTex = _MaterialCentral.instance.actualPack._CounterTex5; break; case 4: _MainTex = _MaterialCentral.instance.actualPack._CounterTex4; break; case 3: _MainTex = _MaterialCentral.instance.actualPack._CounterTex3; break; case 2: _MainTex = _MaterialCentral.instance.actualPack._CounterTex2; break; case 1: _MainTex = _MaterialCentral.instance.actualPack._CounterTex1; break; } meshRenderer.GetPropertyBlock(MatProp); MatProp.SetTexture("_MainTex", _MainTex); meshRenderer.SetPropertyBlock(MatProp); }