On Android the hardcoded path is not found and the code execution stops there because of NullPointerException in the Material constructor
parent
d3fc02c475
commit
62990e2901
|
@ -70,11 +70,14 @@ namespace UnityEngine.UI.Extensions
|
||||||
if (pRenderer != null)
|
if (pRenderer != null)
|
||||||
pRenderer.enabled = false;
|
pRenderer.enabled = false;
|
||||||
|
|
||||||
Shader foundShader = Shader.Find("UI Extensions/Particles/Additive");
|
|
||||||
Material pMaterial = new Material(foundShader);
|
|
||||||
|
|
||||||
if (material == null)
|
if (material == null)
|
||||||
material = pMaterial;
|
{
|
||||||
|
var foundShader = Shader.Find("UI Extensions/Particles/Additive");
|
||||||
|
if (foundShader)
|
||||||
|
{
|
||||||
|
material = new Material(foundShader);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
currentMaterial = material;
|
currentMaterial = material;
|
||||||
if (currentMaterial && currentMaterial.HasProperty("_MainTex"))
|
if (currentMaterial && currentMaterial.HasProperty("_MainTex"))
|
||||||
|
|
Loading…
Reference in New Issue