Beispiel #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);
    }
Beispiel #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);
    }