public void StartBlending() { // Getting the last ingredient in the blender. // Transform lastIngredient = currentBlenderIngredients[currentBlenderIngredients.Count - 1]; Colour lastIngredientsColour = lastIngredient.GetComponent <Ingredient>().colour; Color newColour = colourManager.ConvertColour(lastIngredientsColour, 255); SetBlenderParticle(newColour); //blenderParticleMaterial.SetColor("_BaseColor", Color.green); currentBlenderState = BlenderState.BLENDING; SoundManager.SetSound(soundManager.blenderSource, soundManager.blendingSound, true); SoundManager.PlaySound(soundManager.blenderSource); // Activating the particles. blenderParticles.gameObject.SetActive(true); }