Minimap problem

Hello emos,

I followed this tutorial

But i see only a black circle :confused: (like this)

Here is my mask png file (i also tryied other formats)

Here is Shader code

Shader "Custom/Mask"
{
	properties
	{
		_MainTex ("Main Texture", 2D) = "white" {}
		_Mask ("Mask Texture", 2D) = "white" {}
	}
	
	subshader
	{
		Tags { "Queue"="Transparent"}
		Lighting On
		ZWrite Off
		Blend SrcAlpha OneMinusSrcAlpha
		
		Pass
		{
			SetTexture [_Mask] {combine texture}
			SetTexture [_MainTex] {combine texture, previous}
		}
	
	}
}

Here is GUIManager Code

using UnityEngine;
using System.Collections;

public class GUIManager : MonoBehaviour 
{
	public RenderTexture myTexture;
	public Material myMaterial;
	
	void OnGUI()
	{
		
		if (Event.current.type == EventType.Repaint)
		{
			Graphics.DrawTexture( new Rect(0,0,128,128), myTexture, myMaterial); 
		}
	}
}

I dont think the light get passed in,try combine primary*texture

Hi if you don’t want to develop the whole minimap for your own, you can also try the KGFMapSystem.

Its highly configureable, well documented, tested on pc, mac, android, osx, and ios and It already solves the next 1000 minimap problems you will discover during development. :slight_smile:

assetstore:-> http://u3d.as/content/kolmich-creations/kgfmap-system/3bf
webdemo: β†’ http://www.kolmich.at/kolmich/demo/kgf/KGFMinimap/KGFMinimap.html
documentation: β†’ http://www.kolmich.at/documentation