Esempio n. 1
0
	/**
	 * Get the Material associated with this decal.  Can be null if sheet isn't packed yet.
	 */
	public bool MaterialWithDecal(QD.Decal decal, out Material mat)
	{
		if(decal.isPacked && materials != null && decal.atlasIndex < materials.Length)
			mat = (Material)AssetDatabase.LoadAssetAtPath( AssetDatabase.GUIDToAssetPath(materials[decal.atlasIndex]), typeof(Material) );
		else 
			mat = null;
		return mat != null;
	}
Esempio n. 2
0
	/**
	 * Returns the Shader associated with this decal.  If no shader set, return the default.
	 */
	public Shader ShaderWithDecal(QD.Decal decal)
	{
		if(shaders != null && decal.atlasIndex < shaders.Length)
			return Shader.Find(shaders[decal.atlasIndex]);
		else 
			return DefaultShader;
	}