// Start is called before the first frame update void Start() { MyScript = sliding_plane.GetComponent <projection_plane_texture_changer>(); tex = MyScript.textures; //print(MyScript.textures.Length); //show_random_slice(); //new_texture = (Texture2D)tex[rand_slice]; //upright_projection_plane_GAMEMODE.mainTexture = new_texture; }
// Start is called before the first frame update void Start() { //get variables from other scripts ChangerScript = sliding_plane.GetComponent <projection_plane_texture_changer>(); RandomSliceScript = static_plane.GetComponent <Show_Random_Slice>(); tex = ChangerScript.textures; stepsize = ChangerScript.stepsize; sliding_plane_material = sliding_plane.GetComponent <Renderer>().material; startColor = sliding_plane_material.color; scoreText.text = string.Format("Score: {0000}", SCORE); scoreText.color = Color.white; //Initialize Reset(); //thisRend = this.GetComponent<Renderer>(); //thisRend.material = TransparentMaterial; }