Ejemplo n.º 1
0
    private GameObject CreateRepresentation()
    {
        if (itsShaderMapIcon == null)
        {
            itsShaderMapIcon = Shader.Find("ColorTextureAlpha");
            if (itsShaderMapIcon == null)
            {
                LogError("Cannot find shader ColorTextureAlpha", typeof(KGFMapSystem).Name, this);
                return(null);
            }
        }
        if (itsDataMapIcon.itsTextureIcon == null)
        {
            LogError("itsDataMapIcon.itsTextureIcon is null", typeof(KGFMapSystem).Name, this);
            return(null);
        }

        if (itsShaderMapIcon != null & itsDataMapIcon.itsTextureIcon != null)
        {
            GameObject aGO = KGFMapSystem.GenerateTexturePlane(itsDataMapIcon.itsTextureIcon, itsShaderMapIcon);
            itsMaterial = aGO.GetComponent <Renderer>().sharedMaterial;
            return(aGO);
        }
        return(null);
    }
Ejemplo n.º 2
0
    private GameObject CreateRepresentation()
    {
        if (itsShaderMapIcon == null)
        {
            itsShaderMapIcon = Shader.Find("ColorTextureAlpha");
            if (itsShaderMapIcon == null)
            {
                LogError("Cannot find shader ColorTextureAlpha", typeof(KGFMapSystem).Name, this);
                return(null);
            }
        }
        if (itsDataMapIcon.itsTextureIcon == null)
        {
            LogError("itsDataMapIcon.itsTextureIcon is null", typeof(KGFMapSystem).Name, this);
            return(null);
        }

        if (itsShaderMapIcon != null & itsDataMapIcon.itsTextureIcon != null)
        {
            return(KGFMapSystem.GenerateTexturePlane(itsDataMapIcon.itsTextureIcon, itsShaderMapIcon));
        }
        return(null);
    }