Skip to content

OverlayMap UI error #1777

@bjubes

Description

@bjubes

OverlayMap.cs around line 570 has the following:

colorMapView.AddComponent<UnityEngine.UI.Image>();
colorMapView.transform.SetParent(parentPanel.transform);
colorMapView.AddComponent<UnityEngine.UI.Text>();

and Unity complains:

Can't add 'Text' to New Game Object because a 'Image' is already added to the game object!
A GameObject can only contain one 'Graphic' component.

currently its only using an image, are there any problems with this UI as a result? either way this has to be fixed or the AddComponent<UnityEngine.UI.Text>should be removed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions