Uploaded May 2020 | Updated September 2026, 1 week ago
Unity create Material on the fly - gist.github.com/iwanPlays/04d399de55a98475d906103779ba9ff3
Incomplete:
Material mat = new Material(Shader.Find("Standard"));
mat.SetColor("_Color", new Color(1,0,0,.5f));
mat.SetFloat("_Mode", 3);
mat.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.SrcAlpha);
mat.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
mat.EnableKeyword("_ALPHABLEND_ON");
mat.renderQueue = 3000;
//mat.SetInt("_ZWrite", 0);
//mat.DisableKeyword("_ALPHATEST_ON");
//mat.DisableKeyword("_ALPHAPREMULTIPLY_ON");
transparent material at runtime in player, via c# script api answers.unity.com/questions/999594/change-material-rendering-mode-but-dont-update-mat.html
Unity create Material on the fly - gist.github.com/iwanPlays/04d399de55a98475d906103779ba9ff3
Incomplete:
Material mat = new Material(Shader.Find("Standard"));
mat.SetColor("_Color", new Color(1,0,0,.5f));
mat.SetFloat("_Mode", 3);
mat.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.SrcAlpha);
mat.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
mat.EnableKeyword("_ALPHABLEND_ON");
mat.renderQueue = 3000;
//mat.SetInt("_ZWrite", 0);
//mat.DisableKeyword("_ALPHATEST_ON");
//mat.DisableKeyword("_ALPHAPREMULTIPLY_ON");
transparent material at runtime in player, via c# script api answers.unity.com/questions/999594/change-material-rendering-mode-but-dont-update-mat.html
![How to Download and Install Desktop Goose! [New method in description]
New method: https://youtu.be/Hr5vEIen_hI
Subscribe *QUACK* or goose will get you. You can download desktop goose for free (or donate to the developer because this is fun(ny)) at https://samperson.itch.io/desktop-goose How to Download and Install Desktop Goose! [New method in description]](https://i.ytimg.com/vi/z71hyf_159k/mqdefault.jpg)



